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 8 pull requests #82663

Merged
merged 18 commits into from
Mar 1, 2021
Merged

Rollup of 8 pull requests #82663

merged 18 commits into from
Mar 1, 2021

Commits on Feb 21, 2021

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

Commits on Feb 23, 2021

  1. Update mdbook

    ehuss committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    788167a View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. Remove ENABLE_DOWNLOAD_RUSTC constant

    This was introduced as part of the MVP for `download-rustc`.
    Unfortunately, it doesn't work very well:
    
    - Steps are ignored by default, which makes it easy to leave out a step
    that should be built. For example, the MVP forgot to enable any tests,
    so it was *only* possible to build locally.
    - It didn't work correctly even when it was enabled: calling
      `builder.ensure()` would completely ignore the constant and rebuild the
      step anyway. This has no obvious fix since `ensure()` has to return a
      `Step::Output`.
    
    Instead, this handles `download-rustc` in `impl Step for Rustc` and
    `impl Step for Std`, which to my knowledge are the only build steps that
    don't first go through `impl Step for Sysroot` (`Rustc` is used for
    the `rustc-dev` component).
    
    See rust-lang#79540 (comment)
    and rust-lang#81930 for further context.
    
    Here are some example runs with these changes and `download-rustc`
    enabled:
    
    ```
    $ x.py build src/tools/clippy
    Building stage1 tool clippy-driver (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 1m 09s
    Building stage1 tool cargo-clippy (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.11s
    $ x.py test src/tools/clippy
    Updating only changed submodules
    Submodules updated in 0.01 seconds
        Finished dev [unoptimized + debuginfo] target(s) in 0.09s
    Building stage1 tool clippy-driver (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.09s
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.28s
        Finished release [optimized] target(s) in 15.26s
         Running build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/clippy_driver-8b407b140e0aa91c
    test result: ok. 592 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out
    $ x.py build src/tools/rustdoc
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 41.28s
    Build completed successfully in 0:00:41
    $ x.py test src/test/rustdoc-ui
    Building stage0 tool compiletest (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.12s
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.10s
    test result: ok. 105 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.15s
    $ x.py build compiler/rustc
        Finished dev [unoptimized + debuginfo] target(s) in 0.09s
    Build completed successfully in 0:00:00
    ```
    
    Note a few things:
    
    - Clippy depends on stage1 rustc-dev artifacts, but rustc didn't have to
      be recompiled. Instead, the artifacts were copied automatically.
    - All steps are always enabled. There is no danger of forgetting a step,
      since only the entrypoints have to handle `download-rustc`.
    - Building the compiler (`compiler/rustc`) automatically does no work.
    jyn514 committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    8fb272c View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2021

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

Commits on Feb 28, 2021

  1. Apply lint restrictions from renamed lints

    Previously, if you denied the old name of a renamed lint, it would warn
    about using the new name, but otherwise do nothing. Now, it will behave
    the same as if you'd used the new name.
    jyn514 committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    df156c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ebe798e View commit details
    Browse the repository at this point in the history
  3. Clarify that SyncOnceCell::set blocks.

    Reading the discussion of this feature, I gained the mistaken impression that neither `set` nor `get` blocked, and thus calling `get` immediately after `set` was not guaranteed to succeed. It turns out that `set` *does* block, guaranteeing that the cell contains a value once `set` returns. This change updates the documentation to state that explicitly.
    rkjnsn authored Feb 28, 2021
    Configuration menu
    Copy the full SHA
    2616960 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2021

  1. config.toml error reporting:

    Improve error messages for musl-libdir and wasi-root keys. Previously
    the parser would panic with `unwrap()`. Now it prints
    
          Target "wasm32-wasi" does not have a "wasi-root" key
    
    (and similar for the `musl-libdir` field, which is used in target that
    use musl)
    
    Also update comments around wasi-root field to make it clear that the
    field is only valid in wasm32-wasi target and needs to be moved to a
    `[target.wasm32-wasi]` section to be valid.
    
    Fixes rust-lang#82317
    osa1 committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    81cfa98 View commit details
    Browse the repository at this point in the history
  2. Add diagnostic items

    camsteffen committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    eada4d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6a3b834 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#81210 - ssomers:btree_fix_node_size_test, r…

    …=Mark-Simulacrum
    
    BTreeMap: correct node size test case for choices of B
    
    r? `@Mark-Simulacrum`
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    57c568a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#82360 - osa1:issue82317, r=Mark-Simulacrum

    config.toml parsing error improvements
    
    Improve error messages for musl-libdir and wasi-root keys. Previously
    the parser would panic with `unwrap()`. Now it prints
    
          Target "wasm32-wasi" does not have a "wasi-root" key
    
    (and similar for the `musl-libdir` field, which is used in target that
    use musl)
    
    Also update comments around wasi-root field to make it clear that the
    field is only valid in wasm32-wasi target and needs to be moved to a
    `[target.wasm32-wasi]` section to be valid.
    
    Fixes rust-lang#82317
    
    ---
    
    r? `@Mark-Simulacrum`
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    c8825d0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    57d7c7e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82480 - jyn514:no-enable-constant, r=Mark-S…

    …imulacrum
    
    Remove `ENABLE_DOWNLOAD_RUSTC` constant
    
    `ENABLE_DOWNLOAD_RUSTC` was introduced as part of the MVP for `download-rustc` as a way not to rebuild artifacts that have already been downloaded. Unfortunately, it doesn't work very well:
    
    - Steps are ignored by default, which makes it easy to leave out a step
    that should be built. For example, the MVP forgot to enable any tests,
    so it was only possible to *build* locally.
    - It didn't work correctly even when it was enabled: calling
      `builder.ensure()` would completely ignore the constant and rebuild the
      step anyway. This has no obvious fix since `ensure()` has to return a
      `Step::Output`.
    
    Instead, this handles `download-rustc` in `impl Step for Rustc` and
    `impl Step for Std`, which to my knowledge are the only build steps that
    don't first go through `impl Step for Sysroot` (`Rustc` is used for
    the `rustc-dev` component).
    
    See rust-lang#79540 (comment) and rust-lang#81930 for further context.
    
    Here are some example runs with these changes and `download-rustc`
    enabled:
    
    ```
    $ x.py build src/tools/clippy
    Building stage1 tool clippy-driver (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 1m 09s
    Building stage1 tool cargo-clippy (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.11s
    $ x.py test src/tools/clippy
        Finished dev [unoptimized + debuginfo] target(s) in 0.09s
    Building stage1 tool clippy-driver (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.09s
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.28s
        Finished release [optimized] target(s) in 15.26s
         Running build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/clippy_driver-8b407b140e0aa91c
    test result: ok. 592 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out
    $ x.py build src/tools/rustdoc
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 41.28s
    Build completed successfully in 0:00:41
    $ x.py test src/test/rustdoc-ui
    Building stage0 tool compiletest (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.12s
    Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
        Finished release [optimized] target(s) in 0.10s
    test result: ok. 105 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.15s
    $ x.py build compiler/rustc
        Finished dev [unoptimized + debuginfo] target(s) in 0.09s
    Build completed successfully in 0:00:00
    ```
    
    Note a few things:
    
    - Clippy depends on stage1 rustc-dev artifacts, but rustc didn't have to
      be recompiled. Instead, the artifacts were copied automatically.
    - All steps are always enabled. There is no danger of forgetting a step,
      since only the entrypoints have to handle `download-rustc`.
    - Building the compiler (`compiler/rustc`) automatically does no work.
    
    Helps with rust-lang#81930.
    
    r? `@Mark-Simulacrum`
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    4f14f17 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#82578 - camsteffen:diag-items, r=oli-obk

    Add some diagnostic items for Clippy
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    efb9ee2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#82620 - jyn514:apply-renamed-lints, r=Manis…

    …hearth
    
    Apply lint restrictions from renamed lints
    
    Previously, if you denied the old name of a renamed lint, it would warn
    about using the new name, but otherwise do nothing. Now, it will behave
    the same as if you'd used the new name.
    
    Fixes rust-lang#82615.
    
    r? `@ehuss`
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    6808802 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#82635 - pierwill:edit-infer, r=oli-obk

    Fix typos in rustc_infer::infer::nll_relate
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    6873831 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#82645 - rkjnsn:patch-3, r=Mark-Simulacrum

    Clarify that SyncOnceCell::set blocks.
    
    Reading the discussion of this feature, I gained the mistaken impression that neither `set` nor `get` blocked, and thus calling `get` immediately after `set` was not guaranteed to succeed. It turns out that `set` *does* block, guaranteeing that the cell contains a value once `set` returns. This change updates the documentation to state that explicitly.
    
    Happy to adjust the wording as desired.
    Joshua Nelson authored Mar 1, 2021
    Configuration menu
    Copy the full SHA
    9a86a72 View commit details
    Browse the repository at this point in the history