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 11 pull requests #54068

Closed
wants to merge 39 commits into from

Commits on Sep 5, 2018

  1. Configuration menu
    Copy the full SHA
    d7a74be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5238b52 View commit details
    Browse the repository at this point in the history
  3. Provide more context for unenclosed delimiters

     * When encountering EOF, point at the last opening brace that does not
       have the same indentation level as its close delimiter.
     * When encountering the wrong type of close delimiter, point at the
       likely correct open delimiter to give a better idea of what went
       wrong.
    estebank committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    008aa5a View commit details
    Browse the repository at this point in the history
  4. Fix existing test

    estebank committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    b2d2d83 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3192d3d View commit details
    Browse the repository at this point in the history
  6. slight rewording of labels

    estebank committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    941b2e3 View commit details
    Browse the repository at this point in the history
  7. reword label as per review

    estebank committed Sep 5, 2018
    Configuration menu
    Copy the full SHA
    bebecf8 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2018

  1. Log when buffering a diagnostic.

    This is useful in debugging when and where errors are emitted in
    logs.
    davidtwco committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    308d197 View commit details
    Browse the repository at this point in the history
  2. De-duplicate moved variable errors.

    By introducing a new map that tracks the errors reported and the
    `Place`s that spawned those errors against the move out that the error
    was referring to, we are able to silence duplicate errors by emitting
    only the error which corresponds to the most specific `Place` (that which
    other `Place`s which reported errors are prefixes of).
    
    This generally is an improvement, however there is a case -
    `liveness-move-in-while` - where the output regresses.
    davidtwco committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    b45648b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b9e7574 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4088a38 View commit details
    Browse the repository at this point in the history
  5. Fixup whitespace

    jkozlowski committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    4b7f2eb View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2018

  1. Fix compiling some rustc crates to wasm

    I was dabbling recently seeing what it would take to compile `rustfmt` to the
    `wasm32-unknown-unknown` target and it turns out not much effort is needed!
    Currently `rustfmt` depends on a few rustc crates published to crates.io, so
    this commit touches up those crates to compile for wasm themselves. Notably:
    
    * The `rustc_data_structures` crate's `flock` implementation is stubbed out to
      unconditionally return errors on unsupported platforms.
    * The `rustc_errors` crate is extended to not do any locking for all non-windows
      platforms.
    
    In both of these cases if we port the compiler to new platforms the
    functionality isn't critical but will be discovered over time as it comes up, so
    this hopefully doesn't make it too too hard to compile to new platforms!
    alexcrichton committed Sep 7, 2018
    Configuration menu
    Copy the full SHA
    0c89243 View commit details
    Browse the repository at this point in the history
  2. Don't promote const fn calls with arguments

    unless `#[rustc_promotable]` is added to the function
    oli-obk committed Sep 7, 2018
    Configuration menu
    Copy the full SHA
    d14a9c5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a7175f View commit details
    Browse the repository at this point in the history
  4. Some Sync tests

    oli-obk committed Sep 7, 2018
    Configuration menu
    Copy the full SHA
    9876ff6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a7a208 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3abde0e View commit details
    Browse the repository at this point in the history
  7. Indent fix

    oli-obk committed Sep 7, 2018
    Configuration menu
    Copy the full SHA
    6eced55 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0765eb1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    408f307 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9da9ca5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e0e7cf3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    449516f View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2018

  1. Stabilize the 2018 edition

    Mark-Simulacrum authored and matthiaskrgr committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    e942e0e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0330f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ec351d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3e56dec View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#53851 - oli-obk:local_promotion, r=eddyb

    Limit the promotion of const fns to the libstd and the `rustc_promotable` attribute
    
    There are so many questions around promoting const fn calls... it seems saner to try to limit automatic promotion to const fns which were explicitly opted in for promotion.
    
    I added the attribute to all public stable const fns that were already promotable (e.g. not Cell::new) in order to not cause any breakage
    
    r? @eddyb
    
    cc @nikomatsakis
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    4d187ae View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#53949 - estebank:unclosed-delim, r=nikomats…

    …akis
    
    Improve messages for un-closed delimiter errors
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    1e5e014 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#53960 - estebank:issue-51303, r=nagisa

    Fix incorrect outer function type parameter message
    
    Fix rust-lang#51303.
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    7c9b41a View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#53988 - eddyb:issue-53770, r=petrochenkov

    rustc_resolve: only prepend CrateRoot to a non-keyword segment.
    
    Fixes rust-lang#53770 by treating `use` paths as absolute in a finer-grained manner, specifically:
    ```rust
    use {a, crate::b, self::c, super::d};
    ```
    Used to be interpreted as if it were (when `uniform_paths` is not enabled):
    ```rust
    use ::{a, crate::b, self::c, super::d};
    ```
    With this PR, the `CrateRoot` pseudo-keyword indicating an absolute path is only inserted when the first path segment is found (if it's not a keyword), i.e. the example behaves like:
    ```rust
    use {::a, crate::b, self::c, super::d};
    ```
    This should (finally) make `use {path};` fully equivalent to `use path;`.
    
    r? @petrochenkov cc @cramertj @joshtriplett @nikomatsakis
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    9a442e7 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#53995 - davidtwco:issue-53807, r=nikomatsakis

    Too many errors for incorrect move in loop with NLL enabled
    
    Fixes rust-lang#53807.
    
    r? @nikomatsakis
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    b15a146 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#53998 - eddyb:issue-53728, r=oli-obk

    rustc_codegen_llvm: don't assume offsets are always aligned.
    
    Fixes rust-lang#53728 by taking into account not just overall type alignment and the field's alignment when determining whether a field is aligned or not ("packed"), but also the field's offset within the type.
    
    Previously, rustc assumed that the offset was always at least as aligned as `min(struct.align, field.align)`. However, there's no real reason to have that assumption, and it obviously can't always be true after we implement `#[repr(align(N), pack(K))]`. There's also a case today where that assumption is not true, involving niche discriminants in enums:
    
    Suppose that we have the code in rust-lang#53728:
    ```Rust
    #[repr(u16)]
    enum DeviceKind {
        Nil = 0,
    }
    
    #[repr(packed)]
    struct DeviceInfo {
        endianness: u8,
        device_kind: DeviceKind,
    }
    
    struct Wrapper {
        device_info: DeviceInfo,
        data: u32
    }
    ```
    
    Observe the layout of `Option<Wrapper>`. It has an alignment of 4 because of the `u32`. `device_info.device_kind` is a good niche field to use, which means the enum ends up with this layout:
    ```
    size = 8
    align = 4
    fields = [
        { offset=1, type=u16 } // discriminant, .<Some>.device_info.device_kind
    ]
    ```
    
    And here we have an discriminant with alignment 2 (`u16`) but offset 1.
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    a88d6fb View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#54000 - jkozlowski:fix-53174, r=cramertj

    Allow named lifetimes in async functions.
    
    - Fixes rust-lang#53174
    
    Code by @eddyb; @cramertj suggested I lift it off another change so we can fix rust-lang#53174.
    
    r? @cramertj
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    0eb8ea9 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#54011 - eddyb:anchored-in-the-future, r=pet…

    …rochenkov
    
    rustc_resolve: inject `uniform_paths` canary always on Rust 2018.
    
    **NOTE**: this PR is based on rust-lang#53988, only the second commit is new.
    
    This PR is an attempt at future-proofing "anchored paths" by emitting the same ambiguity errors that `#![feature(uniform_paths)]` would, with slightly changed phrasing (see added UI tests).
    
    r? @petrochenkov cc @aturon @Centril @joshtriplett
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    10418e8 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#54024 - alexcrichton:compile-to-wasm, r=pet…

    …rochenkov
    
    Fix compiling some rustc crates to wasm
    
    I was dabbling recently seeing what it would take to compile `rustfmt` to the
    `wasm32-unknown-unknown` target and it turns out not much effort is needed!
    Currently `rustfmt` depends on a few rustc crates published to crates.io, so
    this commit touches up those crates to compile for wasm themselves. Notably:
    
    * The `rustc_data_structures` crate's `flock` implementation is stubbed out to
      unconditionally return errors on unsupported platforms.
    * The `rustc_errors` crate is extended to not do any locking for all non-windows
      platforms.
    
    In both of these cases if we port the compiler to new platforms the
    functionality isn't critical but will be discovered over time as it comes up, so
    this hopefully doesn't make it too too hard to compile to new platforms!
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    56ceb16 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#54057 - matthiaskrgr:stabilize-edition-plus…

    …-clippy, r=alexcrichton
    
    Stabilize edition 2018; also updates Clippy and RLS
    
    Supersedes rust-lang#53999
    Clippy build was failing there because crate_visibility_modifier feature was taken out of edition 2018 and clippy used it.
    The clippy update enables the corresponding feature explicitly.
    
    r? @Mark-Simulacrum
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    870144f View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#54064 - nagisa:tiny-typo, r=sfackler

    `&CStr`, not `CStr`, is the counterpart of `&str`
    Mark-Simulacrum committed Sep 8, 2018
    Configuration menu
    Copy the full SHA
    b93b944 View commit details
    Browse the repository at this point in the history