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 #123385

Merged
merged 19 commits into from
Apr 2, 2024
Merged

Rollup of 8 pull requests #123385

merged 19 commits into from
Apr 2, 2024

Commits on Mar 29, 2024

  1. Add fn const BuildHasherDefault::new

    Because `HashMap::with_hasher` constness is being stabilized this will
    in turn allow creating empty HashMap<K,V,BuildHasherDefault<H>> in const
    context for any H: Default + Hasher.
    krtab committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    54ab425 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2024

  1. De-LLVM the unchecked shifts [MCP#693]

    This is just one part of the MCP, but it's the one that IMHO removes the most noise from the standard library code.
    
    Seems net simpler this way, since MIR already supported heterogeneous shifts anyway, and thus it's not more work for backends than before.
    scottmcm committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    0601f0c View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    f2fd2d8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6c5c48e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64b75f7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5ee4d13 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    70b4ace View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    327aa19 View commit details
    Browse the repository at this point in the history
  7. Update tests/mir-opt/inline/unchecked_shifts.rs

    Co-authored-by: Waffle Maybe <[email protected]>
    scottmcm and WaffleLapkin authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    4626521 View commit details
    Browse the repository at this point in the history
  8. CFI: Support non-general coroutines

    Previously, we assumed all `ty::Coroutine` were general coroutines and
    attempted to generalize them through the `Coroutine` trait. Select
    appropriate traits for each kind of coroutine.
    maurer committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    a333b82 View commit details
    Browse the repository at this point in the history
  9. Update sysinfo to 0.30.8

    Fixes a Mac specific issue when using `build-metrics = true` in `config.toml`
    Hoverbear committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    b626f01 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#123198 - krtab:build_hasher_default_const_n…

    …ew, r=Amanieu
    
    Add fn const BuildHasherDefault::new
    
    See [tracking issue](rust-lang#123197) for justification.
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    d63ddef View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#123226 - scottmcm:u32-shifts, r=WaffleLapkin

    De-LLVM the unchecked shifts [MCP#693]
    
    This is just one part of the MCP (rust-lang/compiler-team#693), but it's the one that IMHO removes the most noise from the standard library code.
    
    Seems net simpler this way, since MIR already supported heterogeneous shifts anyway, and thus it's not more work for backends than before.
    
    r? WaffleLapkin
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    1b0e46f View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#123302 - compiler-errors:sized-bound-first,…

    … r=estebank
    
    Make sure to insert `Sized` bound first into clauses list
    
    rust-lang#120323 made it so that we don't insert an implicit `Sized` bound whenever we see an *explicit* `Sized` bound. However, since the code that inserts implicit sized bounds puts the bound as the *first* in the list, that means that it had the **side-effect** of possibly meaning we check `Sized` *after* checking other trait bounds.
    
    If those trait bounds result in ambiguity or overflow or something, it may change how we winnow candidates. (**edit: SEE** rust-lang#123303) This is likely the cause for the regression in rust-lang#123279 (comment), since the impl...
    
    ```rust
    impl<T: Job + Sized> AsJob for T { // <----- changing this to `Sized + Job` or just `Job` (which turns into `Sized + Job`) will FIX the issue.
    }
    ```
    
    ...looks incredibly suspicious.
    
    Fixes [after beta-backport] rust-lang#123279.
    
    Alternative is to revert rust-lang#120323. I don't have a strong opinion about this, but think it may be nice to keep the diagnostic changes around.
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    a38dde9 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#123348 - fmease:add-synth-auto-trait-impls-…

    …tests, r=GuillaumeGomez
    
    rustdoc: add a couple of regression tests
    
    Fixes rust-lang#114657.
    Fixes rust-lang#112828.
    Fixes rust-lang#107715.
    
    r? rustdoc
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    464f264 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#123362 - oli-obk:thread_local_nested_static…

    …s, r=estebank
    
    Check that nested statics in thread locals are duplicated per thread.
    
    follow-up to rust-lang#123310
    
    cc ``@compiler-errors`` ``@RalfJung``
    
    fwiw: I have no idea how thread local statics make that work under LLVM, and miri fails on this example, which I would have expected to be the correct behaviour.
    
    Since the `#[thread_local]` attribute is just an internal implementation detail, I'm just going to start hard erroring on nested mutable statics in thread locals.
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    5b71768 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#123368 - maurer:cfi-non-general-coroutines,…

    … r=compiler-errors
    
    CFI: Support non-general coroutines
    
    Previously, we assumed all `ty::Coroutine` were general coroutines and attempted to generalize them through the `Coroutine` trait. Select appropriate traits for each kind of coroutine.
    
    I have this marked as a draft because it currently only fixes async coroutines, and I think it make sense to try to fix gen/async gen coroutines before this is merged.
    
    If the issue [mentioned](rust-lang#123106 (comment)) in the original PR is actually affecting someone, we can land this as is to remedy it.
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    9372948 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#123375 - fmease:rustdoc-sati-re-hotfix, r=G…

    …uillaumeGomez
    
    rustdoc: synthetic auto trait impls: accept unresolved region vars for now
    
    rust-lang#123348 (comment):
    
    > Right, [in rust-lang#123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy.  I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one.
    >
    > `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely rust-lang#120606]).
    
    Fixes rust-lang#123370.
    Fixes rust-lang#112242.
    
    r? ``@GuillaumeGomez``
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    8e271d7 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#123378 - ferrocene:hoverbear/bump-sysinfo-t…

    …o-0.30.8, r=Nilstrieb
    
    Update sysinfo to 0.30.8
    
    Fixes a Mac specific issue when using `metrics = true` in `config.toml`.
    
    ```config.toml
    # Collect information and statistics about the current build and writes it to
    # disk. Enabling this or not has no impact on the resulting build output. The
    # schema of the file generated by the build metrics feature is unstable, and
    # this is not intended to be used during local development.
    metrics = true
    ```
    
    During repeated builds, as the generated `metrics.json` grew, eventually `refresh_cpu()` would be called in quick enough succession (specifically: under 200ms) that a divide by zero would occur, leading to a `NaN` which would not be serialized, then when the `metrics.json` was re-read it would fail to parse.
    
    That error looks like this (collected from Ferrocene's CI):
    
    ```
       Compiling rustdoc-tool v0.0.0 (/Users/distiller/project/src/tools/rustdoc)
        Finished release [optimized] target(s) in 38.37s
    thread 'main' panicked at src/utils/metrics.rs:180:21:
    serde_json::from_slice::<JsonRoot>(&contents) failed with invalid type: null, expected f64 at line 1 column 9598
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    Build completed unsuccessfully in 0:00:40
    
    Exited with code exit status 1
    ```
    
    Related: GuillaumeGomez/sysinfo#1236
    matthiaskrgr authored Apr 2, 2024
    Configuration menu
    Copy the full SHA
    31900b4 View commit details
    Browse the repository at this point in the history