Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#160941 (Enforce safety comments on `alloc`)
- rust-lang/rust#161975 (Abort instead of unwinding out of an inconsistent BTreeMap::split_off)
- rust-lang/rust#157968 (Preserve ambiguous glob lint for subtrait method picks)
- rust-lang/rust#161514 (rework handling of doc attributes on macro calls)
- rust-lang/rust#161944 (rustdoc: Take into account edition information for keyword highlighting)
- rust-lang/rust#161974 (remove rustc_never_type_options attr remnants)
- rust-lang/rust#161978 (Move rustdoc ui doctests into the right testsuite)
Failed merges:
- rust-lang/rust#161702 (Use `drop_guard` in some places in {core,alloc,std})
chore: bump to cc@1.4.3 for rustc_llvm and library
### What is this?
Old cc-rs derives this from the `-Clto` rustflag on its own.
`cc@1.2.39` starts gating that behind `-Clinker-plugin-lto`,
which bootstrap doesn't pass.
Therefore,
we need to pass this flag explicitly to keep LTO mode
Previous efforts:
* https://github.com/rust-lang/rust/pull/146186
* https://github.com/rust-lang/rust/pull/155438
I personally want this because of cc 1.3.0+ has the support of Cargo `-Ztrim-paths`,
which helps what I am experimenting in <https://github.com/rust-lang/rust/pull/161049>.
### How to review
Commit by commit.
To keep commits bisect-able,
I added the first commit without cc bump.
clang should be fine with duplicate `-flto` flags.
One thing I am not certain is whether we should probe `-flto` flag in this case,
or just make this fail if `-flto` isn't supported.
(I assume `-flto` is quote widely supported)
r? Kobzol
---
🤖 **LLM disclosure:** I used LLM for the experiment of <https://github.com/rust-lang/rust/pull/161049>, but not the bootstrap LTO change in this PR.
Upgrade and deduplicate dependencies
- Upgrade from `getrandom v0.4.2` to `v0.4.3` to drop its `wasip2` and
`wasip3` dependencies and many transitives.
- Upgrade from `gimli v0.33` to `v0.34` as a direct dependency and
through a `thorin-dwp` upgrade.
- Upgrade from `object v0.37` and `v0.38` to `v0.39` as a direct
dependency and via `ar_archive_writer` and `thorin-dwp` upgrades.
- Upgrade `libloading` and `wasmparser` to match other dependencies.
This also consolidates from `hashbrown v0.15`, `v0.16`, and `v0.17` to
just `v0.17.1`, which is the same that `std` currently uses.
Store identity argument indices instead of bound generic arguments so
callers can index concrete alias arguments without changing rigidness
through instantiation.
- Upgrade from `getrandom v0.4.2` to `v0.4.3` to drop its `wasip2` and
`wasip3` dependencies and many transitives.
- Upgrade from `gimli v0.33` to `v0.34` as a direct dependency and
through a `thorin-dwp` upgrade.
- Upgrade from `object v0.37` and `v0.38` to `v0.39` as a direct
dependency and via `ar_archive_writer` and `thorin-dwp` upgrades.
- Upgrade `libloading` and `wasmparser` to match other dependencies.
This also consolidates from `hashbrown v0.15`, `v0.16`, and `v0.17` to
just `v0.17.1`, which is the same that `std` currently uses.
Rollup of 25 pull requests
Successful merges:
- rust-lang/rust#158147 (std: fix stack buffer overflow in Windows junction_point)
- rust-lang/rust#160130 (Select cache values to verify by key fingerprint, not value fingerprint)
- rust-lang/rust#160343 (Rename `OutlivesPredicate` to `OutlivesClause`)
- rust-lang/rust#160360 (Remove rustc_middle dependency on rustc_hir_pretty)
- rust-lang/rust#160387 (rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit to backend parallelism)
- rust-lang/rust#160422 (move mir-opt miri tests to CI logic)
- rust-lang/rust#160444 (Avoid resolving path keywords outside `TypeNS`)
- rust-lang/rust#160510 (Resolver: (un)tracked borrows for `CmRefCell` made safe by unsafe speculative flag)
- rust-lang/rust#155424 ([blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template)
- rust-lang/rust#158726 (std: move futex implementations into sys::sync::futex)
- rust-lang/rust#158762 (Emit thumb code on VEX V5)
- rust-lang/rust#159225 (Split IncrCompSession out of Session)
- rust-lang/rust#159820 (Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe`)
- rust-lang/rust#160198 (Rework `smallest_range_containing` to handle duplicates)
- rust-lang/rust#160362 (Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`)
- rust-lang/rust#160390 (autodiff: Handle slice-tailed DSTs in type trees)
- rust-lang/rust#160420 (Suggest `cast_signed()` for overflowing signed integer literals)
- rust-lang/rust#160501 (Add bootstrap CLI snapshot test for testing miri)
- rust-lang/rust#160516 (Add regression test for HRTB projection in closure)
- rust-lang/rust#160520 (Add some tests for specialization)
- rust-lang/rust#160522 (fix(bootstrap): Normalize the names of proc macro dependency crates)
- rust-lang/rust#160523 (Add regression test for opaque type)
- rust-lang/rust#160531 (docs: fix typo in AllowExprMetavar comment)
- rust-lang/rust#160538 (Update expect messages in tcp.rs doc examples to follow the style guide)
- rust-lang/rust#160548 (bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step)
Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`
`rustc_privacy` pulls in all of `rustc_ty_utils`, but only wants `SpannedTypeVisitor` and `walk_types`. Move those to a small `rustc_ty_walk` crate.
This allows `rustc_privacy` to start building much sooner.
Type fallback refactorings
- Don't merge different kinds of infer variables into `Ty` before matching them back
- Do fallback only on root vars (this is semantically equivalent to what we currently do; unifying any of the infer vars from the same equivalence class necesserily affects all of them) (this makes https://github.com/rust-lang/rust/pull/159003 a bit less hacky though)
- Do some simplification that has been allowed by the previous changes
cc @lcnr