Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 22 pull requests #57727

Closed
wants to merge 57 commits into from
Closed

Rollup of 22 pull requests #57727

wants to merge 57 commits into from

Commits on Dec 13, 2018

  1. Remove confusing comment about ideally using ! for c_void

    Using `!` for `c_void` would have the problem that pointers and
    potentially references to an uninhabited type would be created, and at
    least for references this is UB.
    
    Also document in addition that newtype wrappers around `c_void` are not
    recommended for representing opaque types (as a workaround for `extern
    type` not being stable) but instead refer to the Nomicon.
    sdroege committed Dec 13, 2018
    Configuration menu
    Copy the full SHA
    5eafae2 View commit details
    Browse the repository at this point in the history
  2. Update code comments of c_void to explain the reasoning for its cur…

    …rent implementation
    
    We need at least two variants of the enum as otherwise the compiler
    complains about the #[repr(u8)] attribute and we also need at least one
    variant as otherwise the enum would be uninhabitated and dereferencing
    pointers to it would be UB.
    
    As such, mark the variants not unstable because they should not actually
    exist but because they are temporary implementation details until
    `extern type` is stable and can be used instead.
    sdroege committed Dec 13, 2018
    Configuration menu
    Copy the full SHA
    8de8880 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2019

  1. Cleanup PartialEq docs.

    - Cleanup the `impl PartialEq<BookFormat> for Book` implementation
    - Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric
      - Fixes rust-lang#53844.
    - Removes the last example since it appears to be redundant with the
      previous two examples.
    frewsxcv committed Jan 5, 2019
    Configuration menu
    Copy the full SHA
    96678df View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2019

  1. Fix compile error

    frewsxcv committed Jan 6, 2019
    Configuration menu
    Copy the full SHA
    0d3dfdf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    319a2c1 View commit details
    Browse the repository at this point in the history
  3. Update cmp.rs

    frewsxcv committed Jan 6, 2019
    Configuration menu
    Copy the full SHA
    bbbabdf View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2019

  1. Configuration menu
    Copy the full SHA
    6c60662 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2019

  1. Configuration menu
    Copy the full SHA
    423a5bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1445a06 View commit details
    Browse the repository at this point in the history
  3. whitespace

    frewsxcv committed Jan 12, 2019
    Configuration menu
    Copy the full SHA
    0394dce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ebdd072 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2019

  1. Support passing cflags/cxxflags/ldflags to LLVM build

    This may be needed with some host compilers.
    petrhosek committed Jan 14, 2019
    Configuration menu
    Copy the full SHA
    c663272 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f4ded5b View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2019

  1. Pass a default value when unwrapping a span

    AB1908 committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    e5e9867 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    096ca87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93b5536 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ed717f3 View commit details
    Browse the repository at this point in the history
  5. fix nested matchers with ?

    mark-i-m committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    6046be4 View commit details
    Browse the repository at this point in the history
  6. update/add tests

    mark-i-m committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    dabe86d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    feda604 View commit details
    Browse the repository at this point in the history
  8. update test output

    mark-i-m committed Jan 15, 2019
    Configuration menu
    Copy the full SHA
    aa1ce32 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2019

  1. demonstrate symmetry

    frewsxcv committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    32b2834 View commit details
    Browse the repository at this point in the history
  2. Add some links in std::fs.

    A few items were referenced, but did not have links.
    ehuss committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    bd8ee51 View commit details
    Browse the repository at this point in the history
  3. Use Lit rather than P<Lit> in hir::ExprKind.

    It's simpler and makes some benchmark run up to 1% faster. It also makes
    `hir::ExprKind` more like `ast::ExprKind` (which underwent the
    equivalent change in rust-lang#55777).
    nnethercote committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    ae4b14e View commit details
    Browse the repository at this point in the history
  4. Remove hir::Label.

    It's identical to `ast::Label`.
    nnethercote committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    dc45528 View commit details
    Browse the repository at this point in the history
  5. Fix release manifest generation

    Jethro Beekman committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    0772dbb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    01d0ae9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e4e8885 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2019

  1. Configuration menu
    Copy the full SHA
    22251a8 View commit details
    Browse the repository at this point in the history
  2. Add test for linking non-existent static library

    AB1908 committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    1e3f475 View commit details
    Browse the repository at this point in the history
  3. Fix tidy errors.

    pthariensflame committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    fefe1da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3884cc8 View commit details
    Browse the repository at this point in the history
  5. Add signed num::NonZeroI* types

    Multiple people have asked for them, in
    rust-lang#49137.
    Given that the unsigned ones already exist,
    they are very easy to add and not an additional maintenance burden.
    SimonSapin committed Jan 17, 2019
    Configuration menu
    Copy the full SHA
    9be4c76 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d34b3e9 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2019

  1. Fix suggestions given mulitple bad lifetimes

    When given multiple lifetimes prior to type parameters in generic
    parameters, do not ICE and print the correct suggestion.
    dlrobertson committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    e3ba6ed View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#56594 - sdroege:c_void-is-not-never, r=TimNN

    Remove confusing comment about ideally using `!` for `c_void`
    
    Using `!` for `c_void` would have the problem that pointers and
    potentially references to an uninhabited type would be created, and at
    least for references this is UB.
    
    In addition document that newtype wrappers around `c_void` can be used
    safely in place of `extern type` until the latter is stabilized.
    
    ----
    
    I'm not 100% sure about the usage for opaque types as the [nomicon](https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs) still recommends using `#[repr(C)] pub struct Foo { _private: [u8; 0] }` but it seems like these two should be equivalent in the end? Also the `#[repr(C)]` (in both cases) should be unneeded because such types never being passed by value, never being dereferenced but only passed around as pointer or reference, so the representation of (*values* of) the type itself should not matter at all?
    
    Also in context of `c_void` and `!` the second unresolved question in the [`extern type`](rust-lang#43467) stabilization ticket seems relevant
    
    > In [std's](https://github.com/rust-lang/rust/blob/164619a8cfe6d376d25bd3a6a9a5f2856c8de64d/src/libstd/os/raw.rs#L59-L64) source, it is mentioned that LLVM expects i8* for C's void*.
    > We'd need to continue to hack this for the two c_voids in std and libc.
    > But perhaps this should be done across-the-board for all extern types?
    > Somebody should check what Clang does.
    
    Please correct me if my understanding is wrong and everything's actually fine as is.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    33d64b0 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#57107 - mjbshaw:thread_local_test, r=nikoma…

    …tsakis
    
    Add a regression test for mutating a non-mut #[thread_local]
    
    This should close rust-lang#54901 since the regression has since been fixed.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    2b8d02f View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#57340 - eqrion:doc/c_variadic, r=Mark-Simul…

    …acrum
    
    Use correct tracking issue for c_variadic
    
    Fixes rust-lang#57306
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    48a2f37 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#57357 - frewsxcv:frewsxcv-partial-eq, r=Qui…

    …etMisdreavus
    
    Cleanup PartialEq docs.
    
    - Cleanup the `impl PartialEq<BookFormat> for Book` implementation
    - Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric
      - Fixes rust-lang#53844.
    - Removes the last example since it appears to be redundant with the
      previous two examples.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    c3c5d66 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#57370 - petrhosek:llvm-flags, r=alexcrichton

    Support passing cflags/cxxflags/ldflags to LLVM build
    
    This may be needed with some host compilers.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    845106f View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#57475 - SimonSapin:signed, r=alexcrichton

    Add signed num::NonZeroI* types
    
    Multiple people have asked for them in rust-lang#49137. Given that the unsigned ones already exist, they are very easy to add and not an additional maintenance burden.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    dd545ee View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#57501 - petrochenkov:highvar, r=alexreg

    High priority resolutions for associated variants
    
    In rust-lang#56225 variants were assigned lowest priority during name resolution to avoid crater run and potential breakage.
    
    This PR changes the rules to give variants highest priority instead.
    Some motivation:
    - If variants (and their constructors) are treated as associated items, then they are obviously *inherent* associated items since they don't come from traits.
    - Inherent associated items have higher priority during resolution than associated items from traits.
    - The reason is that there is a way to disambiguate in favor of trait items (`<Type as Trait>::Ambiguous`), but there's no way to disambiguate in favor of inherent items, so they became unusable in case of ambiguities if they have low priority.
    - It's technically problematic to fallback from associated types to anything until lazy normalization (?) is implemented.
    
    Crater found some regressions from this change, but they are all in type positions, e.g.
    ```rust
    fn f() -> Self::Ambiguos { ... } // Variant `Ambiguous` or associated type `Ambiguous`?
    ```
    , so variants are not usable there right now, but they may become usable in the future if rust-lang/rfcs#2593 is accepted.
    This PR keeps code like this successfully resolving, but introduces a future-compatibility lint `ambiguous_associated_items` that recommends rewriting it as `<Self as Trait>::Ambiguous`.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    b025f26 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#57551 - petrochenkov:regrtest, r=nikomatsakis

    resolve: Add a test for issue rust-lang#57539
    
    Add a test for the bugfix regression reported in rust-lang#57539
    
    Closes rust-lang#57539
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    6b0d66b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#57610 - mark-i-m:nested-matchers, r=petroch…

    …enkov
    
    Fix nested `?` matchers
    
    fix rust-lang#57597
    
    I'm not 100% if this works yet...
    
    cc @alercah
    
    When  this is ready (but perhaps not yet):
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    53f7e66 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#57634 - oli-obk:remove_unused_argument, r=d…

    …avidtwco
    
    Remove an unused function argument
    
    The only use was a debug printing, which might help someone with debugging dataflow problems, but seems otherwise useless
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    e964ca7 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#57635 - euclio:path-separators, r=michaelwo…

    …erister
    
    use structured macro and path resolve suggestions
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    f4b8998 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#57636 - GuillaumeGomez:fix-sources-sidebar,…

    … r=QuietMisdreavus
    
    Fix sources sidebar not showing up
    
    Fixes rust-lang#57601.
    
    The order of imports made it so that the sidebar creation was called before the sidebar sources were created. Like this, when the sources are loaded, they create the sidebar as expected.
    
    r? @QuietMisdreavus
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    4d29cca View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#57646 - GuillaumeGomez:fix-css, r=QuietMisd…

    …reavus
    
    Fixes text becoming invisible when element targetted
    
    Fixes rust-lang#57628.
    
    r? @QuietMisdreavus
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    67386f0 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#57649 - petrochenkov:privexist, r=arielb1

    privacy: Account for associated existential types
    
    Turns out they *can* be associated (but only in impls, not traits).
    Fixes rust-lang#53546 (comment)
    
    r? @arielb1
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    e8f2aec View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#57650 - AB1908:master, r=petrochenkov

    librustc_metadata: Pass a default value when unwrapping a span
    
    Fixes rust-lang#57323.
    
    When compiling with `static-nobundle` a-la
    
    `rustc -l static-nobundle=nonexistent main.rs`
    
    we now get a neat output in the form of:
    
    ```
    error[E0658]: kind="static-nobundle" is feature gated (see issue rust-lang#37403)
      |
      = help: add #![feature(static_nobundle)] to the crate attributes to enable
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0658`.
    ```
    The build and tests completed successfully on my machine. Should I be adding a new test?
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    f7f5450 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#57654 - ehuss:fs-links, r=alexcrichton

    Add some links in std::fs.
    
    A few items were referenced, but did not have links.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    7eabbdd View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#57658 - nnethercote:rm-hir-P-Lit, r=michael…

    …woerister
    
    Two HIR tweaks
    
    Two HIR tweaks that make things slightly simpler and faster.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    00c582e View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#57659 - jethrogb:jb/release-manifest, r=ale…

    …xcrichton
    
    Fix release manifest generation
    
    r? @alexcrichton
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    f451b6a View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#57683 - xfix:patch-15, r=QuietMisdreavus

    Document Unpin in std::prelude documentation
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    3135ddb View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…

    …-applicability, r=withoutboats
    
    Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.
    
    This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
    An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    06786bb View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#57698 - michaelwoerister:issue57692, r=Zoxc

    Fix typo bug in DepGraph::try_mark_green().
    
    r? @Zoxc
    
    Fixes rust-lang#57692.
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    0340cf4 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#57720 - dlrobertson:fix_57521, r=estebank

    Fix suggestions given mulitple bad lifetimes
    
    When given multiple lifetimes prior to type parameters in generic
    parameters, do not ICE and print the correct suggestion.
    
    r? @estebank
    
    CC @pnkfelix
    
    Fixes: rust-lang#57521
    Centril committed Jan 18, 2019
    Configuration menu
    Copy the full SHA
    ca72ad1 View commit details
    Browse the repository at this point in the history