Rollup of 16 pull requests - #160549
Closed
jhpratt wants to merge 35 commits into
Closed
Conversation
This will allow introducing a separate incr comp session dir for the post LTO artifacts in the future. In addition it statically encodes the lifetime of the incr comp session rather than requiring an enum behind a mutex stored in the Session.
Pure file moves; the module path repointing and platform gating follow in the next commit. Recorded in .git-blame-ignore-revs so blame skips the rename.
Select the platform implementation with a cfg_select! in sys::sync::futex, repoint each one at the pal primitives it uses (time, fuchsia, the windows api module, hermit_abi), and remove the now-unused futex declarations from the pal modules. The sync primitives import crate::sys::sync::futex rather than the crate::sys::futex glob re-export.
Use codegen tail discovery so wrappers such as OsStr keep slice element metadata without losing offsets for prefixed DSTs. Keep recursion tracking scoped to the current traversal path.
`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.
…which does tracked and untracked borrowing
…afe` Also renames it to `rustc_specialization_ignore_lifetime_constraints`
There is a `impl PpAnn for TyCtxt` that is unneeded. None of the big crates (middle, trait_selection) actually do any hir pretty printing so it can be removed and can either be implemented for local structs elsewhere or done by casting to `&dyn PpAnn` instead.
Clarify that slice-tail layout checks apply to the sized prefix rather than the slice element, and cover zero-sized slice elements in the type-tree run-make test.
Fixes a small typo in the documentation comment for AllowExprMetavar. Changes decrarative to `declarative`. Change in compiler/rustc_attr_parsing/src/parser.rs: Line 492
Reword the `.expect(...)` messages in the TcpStream/TcpListener doc examples in library/std/src/net/tcp.rs to follow the 'expect as precondition' style from the std library guidance (describe why the operation is expected to succeed, rather than restating the failure). Examples: "set_nodelay call failed" -> "set_nodelay should succeed" "could not set TTL" -> "set_ttl should succeed" "Cannot set non-blocking" -> "set_nonblocking should succeed" Doc-only change, no behavior change.
Co-authored-by: Roland Xu <rcu@live.com>
also refactor check-miri a bit to make it easier to read
…y-sampling, r=cjgillot Select cache values to verify by key fingerprint, not value fingerprint rustc verifies ~1/32 of values loaded from the incremental cache by re-hashing them. The subset is selected by the value fingerprint, so it changes whenever a value changes and between any two compiler builds. That makes verification failures flaky to reproduce, and it moves the re-hashing cost around between the two builds rustc-perf compares, which is why rustc-perf forces `-Zincremental-verify-ich` on every benchmarked invocation. This PR selects by the key fingerprint and the session count instead. Both are fixed for a given previous session, so re-running a failed build verifies the same nodes and a verification failure reproduces on retry. `to_smaller_hash` mixes both fingerprint halves because neither half is evenly distributed on its own: `DefPathHash` keys share the `StableCrateId`, `HirId` keys carry a sequential id. The per-session sampling rate is unchanged at 1/32, and `-Zincremental-verify-ich` is unchanged. Coverage over time improves: the subset rotates with the session count and sweeps the entire cache every 32 sessions, while under value selection a node whose value never changed kept its roll forever, so 31/32 of unchanging values were never verified on a given toolchain. Between two compiler builds the subset still differs, because key fingerprints incorporate the rustc version through `StableCrateId`. Pinning the version via `RUSTC_FORCE_RUSTC_VERSION` and `RUSTC_OVERRIDE_VERSION_STRING` makes corresponding sessions identical; session counts align because both builds run the same scenario sequence from a fresh incremental directory. That would let rustc-perf stop forcing full verification and measure the incremental configuration users actually run. Coverage across compiler releases is unchanged: the version salt reshuffles the subset each release under either scheme, and compiletest forces full verification in all incremental tests.
Remove rustc_middle dependency on rustc_hir_pretty There is a `impl PpAnn for TyCtxt` that is unneeded. None of the big crates (middle, trait_selection) actually do any hir pretty printing so it can be removed and can either be implemented for local structs elsewhere or done by casting to `&dyn PpAnn` instead. This probably doesn't have any perf effects (its not bottlenecking in timings) but I expect it to compose with rust-lang#160336 and its followup works quite well. Old graph: <img width="1999" height="2171" alt="graph" src="https://github.com/user-attachments/assets/756e6a50-a413-4a8d-a0f3-7bbf4de07933" /> New graph: <img width="1853" height="2171" alt="graph_hir_pretty" src="https://github.com/user-attachments/assets/f9607e5a-d00b-4a86-8f6a-cefb45b75ad7" />
move mir-opt miri tests to CI logic It is useful to run Miri tests with mir-opts as that sometimes finds miscompilations. However, doing so on every `./x test miri` is annoying as it makes that take a lot longer, and it is inconsistent with `./miri test` in the Miri repo. So remove this logic there, and instead have the check-miri script in CI invoke the test suite a 2nd time with mir-opts enabled. Cc @rust-lang/miri
…rochenkov Avoid resolving path keywords outside `TypeNS` Fixes rust-lang#160195 After allowing trailing `self`, `self` imports were resolved in all namespaces wrongly. Resolving path keywords should return `Determined` immediately outside `TypeNS`. r? petrochenkov
…ative-flag, r=petrochenkov Resolver: (un)tracked borrows for `CmRefCell` made safe my unsafe speculative flag Implements the tracked/untracked borrowing of `CmRefCell` such that we do not mutate *any* state during speculative resolution. Made safe by an unsafe field that requires any borrows to be dropped before the flag can change. r? @petrochenkov
[blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template **Blocked** until rust-lang/rust-forge#1040 merges. As described in rust-lang/blog.rust-lang.org#1897, this adds a checkbox for authors to confirm that they have/have not used an LLM. For that reason I would like to merge it *before* the blog post.
std: move futex implementations into sys::sync::futex Part of rust-lang#117276. Moves the futex primitives out of the per-platform `sys::pal` modules into a single `sys::sync::futex`, selected with `cfg_select!` the same way the other `sys::sync` backends are. Every consumer of these primitives already lives in `sys::sync` (mutex, rwlock, once, condvar, thread_parking), so they now import `crate::sys::sync::futex` directly instead of reaching `crate::sys::futex` through the `pub use pal::*` glob. I placed it under `sys::sync` rather than a top-level `sys::futex` because the futex API only backs the `sys::sync` primitives and sits next to the existing `sys::sync::thread_parking` backend. Happy to place it to `sys::futex` if you would rather have it as a peer of the other feature modules. The file moves are a separate commit, recorded in `.git-blame-ignore-revs` so blame skips the rename. r? joboet
…oli-obk Split IncrCompSession out of Session This will allow introducing a separate incr comp session dir for the post LTO artifacts in the future. In addition it statically encodes the lifetime of the incr comp session rather than requiring an enum behind a mutex stored in the Session. Based on rust-lang#159000 Part of rust-lang/compiler-team#908
…athanBrouwer Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe` Also renames it to `rustc_specialization_marker`. The "some internal attributes should probably be unsafe" discussion came up in [#t-compiler/major changes > Implement a naming convention for lint/d… compiler-team#1021](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Implement.20a.20naming.20convention.20for.20lint.2Fd.E2.80.A6.20compiler-team.231021/with/612510054). This is one of those attributes. cc @RalfJung
…-dead 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.
…etree, r=oli-obk autodiff: Handle slice-tailed DSTs in type trees Fixes rust-lang#160327 References to `OsStr` reach a `[u8]` tail, but autodiff only recognized direct slices. TypeTree generation then recursed into `OsStr` and hit the slice arm that ICEd. TypeTree generation and ABI activity handling now use `struct_tail_for_codegen`. Slice wrappers keep their element metadata, while prefixed DSTs retain their field offsets. IMO, reusing the existing rustc DST-tail query is cleaner than adding an `OsStr` special case. BTW, coverage includes the reduced `clap_lex` reproducer plus a prefixed slice-tail DST.
Member
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 5, 2026
Rollup of 16 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-*
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
TypeNS#160444 (Avoid resolving path keywords outsideTypeNS)CmRefCellmade safe by unsafe speculative flag #160510 (Resolver: (un)tracked borrows forCmRefCellmade safe my unsafe speculative flag)rustc_unsafe_specialization_markerattribute actuallyunsafe#159820 (Make therustc_unsafe_specialization_markerattribute actuallyunsafe)SpannedTypeVisitorinto its own crate,rustc_ty_walk#160362 (SplitSpannedTypeVisitorinto its own crate,rustc_ty_walk)cast_signed()for overflowing signed integer literals #160420 (Suggestcast_signed()for overflowing signed integer literals)r? @ghost
Create a similar rollup