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 7 pull requests #63610

Closed
wants to merge 28 commits into from
Closed

Commits on Aug 12, 2019

  1. Stop emulating cross-crate hygiene with gensyms

    Most `Ident`s are serialized as `InternedString`s the exceptions are:
    
    * Reexports
    * Attributes
    * Idents in macro definitions
    
    Using gensyms helped reexports emulate hygiene. However, the actual item
    wouldn't have a gensymmed name so would be usable cross-crate. So
    removing this case until we have proper cross-crate hygiene seems
    sensible.
    
    Codegen attributes (`inline`, `export_name`) are resolved by their
    `Symbol`. This meant that opaque macro-expanded codegen attributes could
    cause linker errors. This prevented making built-in derives hygienic.
    matthewjasper committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    c22ba27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3a589a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd9a5b8 View commit details
    Browse the repository at this point in the history
  4. Remove gensyms from built-in derives

    Also make them generally more hygienic with name resolution.
    matthewjasper committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    ade2c8f View commit details
    Browse the repository at this point in the history
  5. Move type parameter shadowing errors to resolve

    For some reason type checking did this. Further it didn't consider
    hygiene.
    matthewjasper committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    1b0b505 View commit details
    Browse the repository at this point in the history
  6. Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}

    We now store it in the `Span` of the expression or item.
    matthewjasper committed Aug 12, 2019
    Configuration menu
    Copy the full SHA
    6f00e1e View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2019

  1. Remove unused SyntaxContext serialization impls

    The implementations were wrong and unused.
    matthewjasper committed Aug 13, 2019
    Configuration menu
    Copy the full SHA
    01587b1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    417f9ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0b713ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5e019de View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9805846 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    039c789 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    01e96dc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0741441 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    88398a4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9287eb6 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2019

  1. Configuration menu
    Copy the full SHA
    4272864 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fe201c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ab9e52 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c1758d5 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2019

  1. Configuration menu
    Copy the full SHA
    f54503c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#63462 - matthewjasper:hygienic-builtin-deri…

    …ves, r=petrochenkov
    
    Opaque builtin derive macros
    
    * Buiilt-in derives are now opaque macros
        * This required limiting the visibility of some previously unexposed functions in `core`.
        * This also required the change to `Ident` serialization.
    * All gensyms are replaced with hygienic identifiers
    * Use hygiene to avoid most other name-resolution issues with buiilt-in derives.
        *  As far as I know the only remaining case that breaks is an ADT that has the same name as one of its parameters. Fixing this completely seemed to be more effort than it's worth.
    * Remove gensym in `Ident::decode`, which lead to linker errors due to `inline` being gensymmed.
        * `Ident`now panics if incremental compilation tries to serialize it (it currently doesn't).
        * `Ident` no longer uses `gensym` to emulate cross-crate hygiene. It only applied to reexports.
        * `SyntaxContext` is no longer serializable.
        * The long-term fix for this is to properly implement cross-crate hygiene, but this seemed to be acceptable for now.
    * Move type/const parameter shadowing checks to `resolve`
        * This was previously split between resolve and type checking. The type checking pass compared `InternedString`s, not Identifiers.
    * Removed the `SyntaxContext` from `{ast, hir}::{InlineAsm, GlobalAsm}`
    
    cc rust-lang#60869
    r? @petrochenkov
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    acf2315 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#63470 - Mark-Simulacrum:rustc-depdep, r=ale…

    …xcrichton
    
    Utilize -Zbinary-dep-depinfo in rustbuild
    
    The last commit moves us over to using binary-dep-depinfo while the first two permit us to bootstrap from what will become future beta, to be released in the next week (it's the `cfg(bootstrap)` processing).
    
    We no longer utilize stamp-file mtimes at all inside rustbuild, and a future PR may be able to entirely eliminate them by eagerly copying to the appropriate sysroot. The only mtime-based dependency tracking left is for documentation because we lie to Cargo about the rustdoc binary, so Cargo does not track changes to the real binary, and codegen-backends because binary-dep-depinfo does not emit that information into the depfiles.
    
    Both of these are fixable in the longer term but this existing patch gives us the following benefits:
     * We no longer delete Cargo target directories manually within a stage. Cross-stage, changes to codegen backends will still clear out target directories. This means that incremental state persists across individual steps (e.g., rebuilding libstd does not clear out librustc incremental state). Fixes rust-lang#54712.
     * Dependency tracking across steps within a given stage is now fully precise. We will not clear out all codegen backend dependencies due to changes in librustc_driver, for example, only deleting the final librustc_codegen_llvm crate. Fixes rust-lang#54008, fixes rust-lang#50481.
     * We properly track codegen backends as a dependency (equivalent to rustc) across changes. Fixes rust-lang#53284, and fixes rust-lang#52719.
     * Cross-stage dependency tracking of crates is also much more accurate and reliable. Most likely fixes rust-lang#49979 (but no reproduction steps in that issue). Fixes rust-lang#59105.
    
    cc rust-lang#63012
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    3ee6036 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk

    Suggest Rust 2018 on `<expr>.await` with no such field
    
    When type checking a field projection (`fn check_field`) to `<expr>.await` where `<expr>: τ` and `τ` is not a primitive type, suggest switching to Rust 2018. E.g.
    
    ```
    error[E0609]: no field `await` on type `std::pin::Pin<&mut dyn std::future::Future<Output = ()>>`
      --> $DIR/suggest-switching-edition-on-await.rs:31:7
       |
    LL |     x.await;
       |       ^^^^^ unknown field
       |
       = note: to `.await` a `Future`, switch to Rust 2018
       = help: set `edition = "2018"` in `Cargo.toml`
       = note: for more on editions, read https://doc.rust-lang.org/edition-guide
    ```
    
    Fixes rust-lang#63533
    
    This PR also performs some preparatory cleanups in `fn check_field`; the last 2 commits are where the suggestion is introduced and tested respectively.
    
    r? @varkor
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    9d9518d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#63545 - Centril:gate-yield-preexp, r=oli-obk

    Feature gate 'yield $expr?' pre-expansion
    
    Also improve the overall ergonomics of pre-expansion gating in general.
    
    r? @Zoxc
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    430e403 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#63548 - eddyb:unicode-demangling, r=alexcri…

    …chton
    
    Update rustc-demangle to 0.1.16.
    
    Includes rust-lang/rustc-demangle#29 and rust-lang/rustc-demangle#30.
    You can see the effects of the former in the testcase changes.
    
    r? @alexcrichton cc @davidtwco @michaelwoerister
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    52e78c5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#63559 - eddyb:v0-mangling-off-by-1, r=estebank

    rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.
    
    I don't really understand why `anonymize_late_bound_regions` starts with `BrAnon(1)` instead of `BrAnon(0)`, but it does (maybe @nikomatsakis knows?): https://github.com/rust-lang/rust/blob/c43d03a19f326f4a323569328cc501e86eb6d22e/src/librustc/ty/fold.rs#L696-L712
    
    Thankfully, the mangling format and demangler implementations are fine, and I just needed to offset the anonymized lifetime indices by `1` to get the correct mangling.
    
    cc @alexcrichton @michaelwoerister
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    74e9002 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#63584 - Centril:cleanup-core-with-more-atb,…

    … r=alexreg
    
    libcore: more cleanups using `#![feature(associated_type_bounds)]`
    
    Turns out this was indeed a bootstrapping issue from a test with `./x.py check` locally after rust-lang#63534 merged.
    
    Closes rust-lang#63393
    
    r? @alexreg
    cc @iluuu1994
    cc rust-lang#52662
    Centril authored Aug 15, 2019
    Configuration menu
    Copy the full SHA
    5908574 View commit details
    Browse the repository at this point in the history