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 16 pull requests #96069

Closed
wants to merge 40 commits into from

Commits on Mar 16, 2022

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

Commits on Mar 23, 2022

  1. Optimize RcInnerPtr::inc_strong instruction count

    Inspired by this internals thread: https://internals.rust-lang.org/t/rc-optimization-on-64-bit-targets/16362
    
    [The generated assembly is a bit smaller](https://rust.godbolt.org/z/TeTnf6144) and is a more efficient usage of the CPU's instruction cache. `unlikely` doesn't impact any of the small artificial tests I've done, but I've included it in case it might help more complex scenarios when this is inlined.
    mjbshaw committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    3f7f5e8 View commit details
    Browse the repository at this point in the history
  2. Format unsafe {} blocks

    mjbshaw committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    f5dd42b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8d14c03 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2022

  1. Configuration menu
    Copy the full SHA
    9cfdb89 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c681a88 View commit details
    Browse the repository at this point in the history
  3. Add test

    bjorn3 committed Mar 24, 2022
    Configuration menu
    Copy the full SHA
    147e5da View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2022

  1. Stablize const_extern_fn for "Rust" and "C"

    All other ABIs are left unstable for now.
    
    cc rust-lang#64926
    Aaron1011 committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    8035796 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2022

  1. Create 2024 edition

    jhpratt committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    6b75406 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2022

  1. Revert "Work around invalid DWARF bugs for fat LTO"

    Since September, the toolchain has not been generating reliable DWARF
    information for static variables when LTO is on. This has affected
    projects in the embedded space where the use of LTO is typical. In our
    case, it has kept us from bumping past the 2021-09-22 nightly toolchain
    lest our debugger break. This has been a pretty dramatic regression for
    people using debuggers and static variables. See rust-lang#90357 for more info
    and a repro case.
    
    This commit is a mechanical revert of
    d5de680 from PR rust-lang#89041, which caused
    the issue. (Note on that PR that the commit's author has requested it be
    reverted.)
    
    I have locally verified that this fixes rust-lang#90357 by restoring the
    functionality of both the repro case I posted on that bug, and debugger
    behavior on real programs. There do not appear to be test cases for this
    in the toolchain; if I've missed them, point me at 'em and I'll update
    them.
    cbiffle committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    98190b7 View commit details
    Browse the repository at this point in the history
  2. Improve debuginfo test coverage for simple statics.

    - Re-enabled basic-types-globals which has been disabled since 2018
    - Updated its now-rotted assertions about GDB's output to pass
    - Rewrote header comment describing some previous state of GDB behavior
      that didn't match either the checked-in assertions _or_ the current
      behavior, and so I assume has just been wrong for some time.
    - Copy-pasta'd the test into a version that uses LTO to check for
      regression on rust-lang#90357, because I don't see a way to matrix the same
      test into several build configurations.
    cbiffle committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    42af197 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2022

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

Commits on Apr 10, 2022

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

Commits on Apr 12, 2022

  1. Configuration menu
    Copy the full SHA
    7f945b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e886dc5 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2022

  1. Fix x test --doc --stage 0 library/std

    I managed to break this in rust-lang#95449.
    I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0`
    and is strictly closer to the previous behavior.
    
    Previously, rustdoc would error with strange issues because of the mismatched sysroot:
    ```
    error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on
      --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5
       |
    14 | use rustc_span::{sym, symbol::Ident, Span, Symbol};
       |     ^^^^^^^^^^
       |
       = note: perhaps that crate needs to be recompiled?
       = note: the following crate versions were found:
               crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib
               crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so
               crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib
    ```
    jyn514 committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    69de213 View commit details
    Browse the repository at this point in the history
  2. add codegen smoke test

    RalfJung committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    eb905c0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c2d57e View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2022

  1. Configuration menu
    Copy the full SHA
    21d3f84 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50c339e View commit details
    Browse the repository at this point in the history
  3. ⬆️ rust-analyzer

    lnicola committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    1e78a47 View commit details
    Browse the repository at this point in the history
  4. update: actions/checkout@v2 to actions/checkout@v3

    update: actions/checkout@v2 to actions/checkout@v3 for all yaml files
    
    Revert "update: actions/checkout@v2 to actions/checkout@v3 for all yaml files"
    
    This reverts commit 7445e582b900f0f56f5f2bd9036aacab97ef28e9.
    
    change GitHub Actions version v2 to v3
    
    change GitHub Actions
    Gumichocopengin8 committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    9d319f3 View commit details
    Browse the repository at this point in the history
  5. Update issue-92893.stderr

    ouz-a committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    c20bb1d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5459e66 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2022

  1. Rollup merge of rust-lang#93969 - bjorn3:codegen_backend_dep_info, r=…

    …pnkfelix
    
    Only add codegen backend to dep info if -Zbinary-dep-depinfo is used
    
    I am currently migrating the cg_clif build system from using a binary linked to the codegen backend as rustc replacement to passing `-Zcodegen-backend` instead. Without this PR this would force cargo to rebuild the sysroot on any change to the codegen backend even if I explicitly specify that I want it to be preserved, which would make development of cg_clif a lot slower. If you still want to have changes to the codegen backend invalidate the cargo build cache you can explicitly specify `-Zbinary-dep-depinfo`.
    
    cc `@eddyb` as the codegen backend was initially added to the depinfo for rust-gpu.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    8f5fd4c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#94461 - jhpratt:2024-edition, r=pnkfelix

    Create (unstable) 2024 edition
    
    [On Zulip](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Deprecating.20macro.20scoping.20shenanigans/near/272860652), there was a small aside regarding creating the 2024 edition now as opposed to later. There was a reasonable amount of support and no stated opposition.
    
    This change creates the 2024 edition in the compiler and creates a prelude for the 2024 edition. There is no current difference between the 2021 and 2024 editions. Cargo and other tools will need to be updated separately, as it's not in the same repository. This change permits the vast majority of work towards the next edition to proceed _now_ instead of waiting until 2024.
    
    For sanity purposes, I've merged the "hello" UI tests into a single file with multiple revisions. Otherwise we'd end up with a file per edition, despite them being essentially identical.
    
    ``@rustbot`` label +T-lang +S-waiting-on-review
    
    Not sure on the relevant team, to be honest.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    9646009 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#94849 - ouz-a:master4, r=oli-obk

    Check var scope if it exist
    
    Fixes rust-lang#92893.
    
    Added helper function to check the scope of a variable, if it doesn't have a scope call delay_span_bug, which avoids us trying to get a block/scope that doesn't exist.
    
    Had to increase `ROOT_ENTRY_LIMIT` was getting tidy error
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    a0e3d80 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#94985 - dtolnay:constattr, r=pnkfelix

    Parse inner attributes on inline const block
    
    According to rust-lang#84414 (comment), inner attributes are intended to be supported *"in all containers for statements (or some subset of statements)"*.
    
    This PR adds inner attribute parsing and pretty-printing for inline const blocks (rust-lang#76001), which contain statements just like an unsafe block or a loop body.
    
    ```rust
    let _ = const {
        #![allow(...)]
    
        let x = ();
        x
    };
    ```
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    851cb4b View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#95224 - mjbshaw:patch-1, r=yaahc

    Optimize RcInnerPtr::inc_strong()/inc_weak() instruction count
    
    Inspired by this internals thread: https://internals.rust-lang.org/t/rc-optimization-on-64-bit-targets/16362
    
    [The generated assembly is a bit smaller](https://rust.godbolt.org/z/TeTnf6144) and is a more efficient usage of the CPU's instruction cache. `unlikely` doesn't impact any of the small artificial tests I've done, but I've included it in case it might help more complex scenarios when this is inlined.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    3b9b3fb View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#95346 - Aaron1011:stablize-const-extern-fn,…

    … r=pnkfelix
    
    Stablize `const_extern_fn` for "Rust" and "C"
    
    All other ABIs are left unstable for now.
    
    cc rust-lang#64926
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    4d3e076 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#95685 - oxidecomputer:restore-static-dwarf,…

    … r=pnkfelix
    
    Revert "Work around invalid DWARF bugs for fat LTO"
    
    Since September, the toolchain has not been generating reliable DWARF
    information for static variables when LTO is on. This has affected
    projects in the embedded space where the use of LTO is typical. In our
    case, it has kept us from bumping past the 2021-09-22 nightly toolchain
    lest our debugger break. This has been a pretty dramatic regression for
    people using debuggers and static variables. See rust-lang#90357 for more info
    and a repro case.
    
    This commit is a mechanical revert of
    d5de680 from PR rust-lang#89041, which caused
    the issue. (Note on that PR that the commit's author has requested it be
    reverted.)
    
    I have locally verified that this fixes rust-lang#90357 by restoring the
    functionality of both the repro case I posted on that bug, and debugger
    behavior on real programs. There do not appear to be test cases for this
    in the toolchain; if I've missed them, point me at 'em and I'll update
    them.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    7a815c7 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#95749 - compiler-errors:ambig, r=oli-obk

    only downgrade selection Error -> Ambiguous if type error is in predicate
    
    That is, we don't care if there's a TypeError type in the ParamEnv.
    
    Fixes rust-lang#95408
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    ef8cf01 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#95908 - compiler-errors:shallow_resolve_ty-…

    …inline, r=oli-obk
    
    Inline `shallow_resolve_ty` into `ShallowResolver`
    
    addresses fixme I found in infcx
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    b82ae65 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#95961 - RalfJung:gather-scatter, r=workingj…

    …ubilee
    
    implement SIMD gather/scatter via vector getelementptr
    
    Fixes rust-lang/portable-simd#271
    
    However, I don't *really* know what I am doing here... Cc `@workingjubilee` `@calebzulawski`
    
    I didn't do anything for cranelift -- `@bjorn3` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    95ec29e View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#95993 - jyn514:fix-stage0-doctests, r=Mark-…

    …Simulacrum
    
    Fix `x test --doc --stage 0 library/std`
    
    I managed to break this in rust-lang#95449.
    I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0`
    and is strictly closer to the previous behavior.
    
    Previously, rustdoc would error with strange issues because of the mismatched sysroot:
    ```
    error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on
      --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5
       |
    14 | use rustc_span::{sym, symbol::Ident, Span, Symbol};
       |     ^^^^^^^^^^
       |
       = note: perhaps that crate needs to be recompiled?
       = note: the following crate versions were found:
               crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib
               crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so
               crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib
    ```
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    df2f5f0 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#96026 - matthiaskrgr:clippy_compl_1304, r=D…

    …ylan-DPC
    
    couple of clippy::complexity fixes
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    c2137f3 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#96034 - Gumichocopengin8:test/btree-set, r=…

    …Dylan-DPC
    
    [test] Add test cases of untested functions for BTreeSet
    
    - add [`is_superset()`](https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.is_superset) and [`remove()`](https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.remove) test cases for BTreeSet since these functions has no test cases.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    ffe46cd View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#96035 - Gumichocopengin8:feature/update-git…

    …hub-action-version, r=pietroalbini
    
    Update GitHub Actions actions/checkout Version v2 -> v3
    
    Update `actions/checkout@v2` to `actions/checkout@v3` because of Node12 will be out of life after Aril 30, 2022 [[Reference](https://nodejs.org/en/about/releases/)].
    `actions/xxxx@v3` use Node16 whose support lasts until April 30, 2024.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    0bde871 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#96047 - lnicola:rust-analyzer-2022-04-14, r…

    …=lnicola
    
    ⬆️ rust-analyzer
    
    r? `@ghost`
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    0caff27 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#96062 - ehuss:test-termination, r=Dylan-DPC

    docs: Update tests chapter for Termination stabilization
    
    A small update for the docs of `#[test]` functions as a result of the `Termination` stabilization in rust-lang#93840.
    fee1-dead committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    21b45bf View commit details
    Browse the repository at this point in the history