Rustc pull update - #2952
Merged
Merged
Conversation
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@045b177 Filtered ref: rust-lang/miri@729eed7 Upstream diff: rust-lang/rust@44860d3...045b177 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
…-connected-sockets Add `getsockname` shim for connecting and connected sockets
Add epoll integration for network sockets
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@4ddd453 Filtered ref: rust-lang/miri@99593b4 Upstream diff: rust-lang/rust@045b177...4ddd453 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
Add basic `getsockopt` shim for reading `SO_ERROR`
Remove `TcpStream::peer_addr` check for network sockets, test epoll readiness for `shutdown`
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@c8c4c83 Filtered ref: rust-lang/miri@75beaba Upstream diff: rust-lang/rust@63b1dfc...c8c4c83 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
…ions Support TTL and TCP nodelay socket options
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@281c97c Filtered ref: rust-lang/miri@bbdb123 Upstream diff: rust-lang/rust@c8c4c83...281c97c This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
…nnect-err Fix `connect` of blocking TCP sockets always returning `ENOTCONN` on error
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1f8e04d Filtered ref: rust-lang/miri@455eb04 Upstream diff: rust-lang/rust@281c97c...1f8e04d This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
…tmp-buffer-readv Fix deallocating temporary buffer on failed `readv`
…r-windows Fix skipping TCP write buffer filling on Windows hosts
ci: declare contents:read on Tier 2 sysroots workflow
Add network socket read and write timeout
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@8f02e85 Filtered ref: rust-lang/miri@f11795e Upstream diff: rust-lang/rust@1f8e04d...8f02e85 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
flock tests: cover the case of asking for both locks on the same file handle
Add support for level-triggered epoll
add shim for `neon.pmull64`
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@bef8e62 Filtered ref: rust-lang/miri@3cc9654 Upstream diff: rust-lang/rust@6368fd5...bef8e62 This merge was created using https://github.com/rust-lang/josh-sync.
windows shims: avoid returning possibly outdated metadata
[Priroda] initial standalone CLI crate
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@76dfce2 Filtered ref: rust-lang/miri@d3a4cd9 Upstream diff: rust-lang/rust@4f84d9f...76dfce2 This merge was created using https://github.com/rust-lang/josh-sync.
Automatic Rustup
[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/rust#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
Emit thumb code on VEX V5 This PR switches the default codegen for the VEX V5 target to emit Thumb-2 instructions, allowing for smaller binary sizes (on the programs I tested this change on, I saw a ~20% size decrease on average). The target is renamed to have the `thumb` prefix instead of the `arm` prefix because of the updated instruction set. Since VEXos starts all programs in Arm32 mode, the program entrypoint is explicitly compiled as ARM code and now transitions to Thumb mode when calling `_start`. Users can still use the updated target in Arm32 mode by specifying `-Ctarget-feature=-thumb-mode`. cc @tropicaaal @Gavin-Niederman
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/rust#159000 Part of rust-lang/compiler-team#908
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
…nnethercote Rework `smallest_range_containing` to handle duplicates @theemathas [pointed out](rust-lang/rust#159438 (comment)) that this method I added in rust-lang/rust#159509 is implicitly assuming that there are no duplicates in the input. That's not a problem for its one use today -- an enum whose layout matters can't have duplicate discriminants -- but it could be a sharp edge in future, so this PR reworks it to handle duplicate values fine. As a bonus, as I tried a couple different approaches (from just asserting to deduping to more) I found this rephrasing that I think is clearer. In particular, while the `.iter().copied().cycle().skip(1)` I'd written *works*, it's definitely not something that you look at and think "oh, obviously". I think this version using `.array_windows::<2>()` is easier to follow and splitting the wraparound and non-wraparound cases also simplifies the `min_by_key` lambda. No changes to any layouts from this -- it just refactors this function.
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.
…oli-obk autodiff: Handle slice-tailed DSTs in type trees Fixes rust-lang/rust#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.
…n, r=mu001999 Suggest `cast_signed()` for overflowing signed integer literals This PR uses `cast_signed()` for same-width conversions and keeps `as` for different-width conversions. It also updates the affected UI test snapshots. Fixes rust-lang/rust#160403
Add bootstrap CLI snapshot test for testing miri To explicitly encode what should happen in `test src/tools/miri` (see https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/slow.20Miri.20job/near/614506823). r? jieyouxu
Add regression test for HRTB projection in closure Closes rust-lang/rust#34430. Adds a test that runs under both solvers
Add some tests for specialization cc rust-lang/rust#31844 (specialization tracking issue) Closes rust-lang/rust#32483 (fixed) Closes rust-lang/rust#48515 (fixed) Closes rust-lang/rust#52396 (fixed) Closes rust-lang/rust#74809 (fixed) Closes rust-lang/rust#77026 (fixed) Closes rust-lang/rust#80700 (fixed) Closes rust-lang/rust#126268 (dupe of rust-lang/rust#102252) cc. rust-lang/rust#50318 (known-bug) cc. rust-lang/rust#36262 (known-bug, fixed-by-next-solver) cc. rust-lang/rust#125014 (known-bug, fixed-by-next-solver) r? nikomatsakis Disclosure: These issues are from Github, but I used an LLM to help copy them over. I reviewed all tests.
…ouxu fix(bootstrap): Normalize the names of proc macro dependency crates Fixes rust-lang/rust#134863 (again) rust-lang/rust#134863 (comment)
Add regression test for opaque type Closes rust-lang/rust#117923 adds suggested check pass test, adapted to the current min_generic_const_args.
docs: fix typo in AllowExprMetavar comment 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
…hpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang/rust#159751 Rewords the `.expect(...)` messages in the `TcpStream`/`TcpListener` doc examples in `library/std/src/net/tcp.rs` to follow the "expect as precondition" style guide introduced in rust-lang/rust#96033. Examples of the change: - `"set_nodelay call failed"` → `"set_nodelay should succeed"` - `"could not set TTL"` → `"set_ttl should succeed"` - `"Cannot set non-blocking"` → `"set_nonblocking should succeed"` 19 doc-example messages updated, all in doc comments (`///`). Doc-only change, no behavior change.
bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step Using a separate step lets us remove the `default_to_suites_only` hack that was added in rust-lang/rust#159131. In the past we did have separate steps for the aliases, which were removed by rust-lang/rust#135097. A key difference now is that the new step is normal Rust code without any clunky macros. Importantly, this PR still preserves the desired skipping behaviour, e.g. `./x test --skip=tests` continues to skip the coverage tests as intended. r? jieyouxu (or bootstrap)
…uwer 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)
Enable polonius alpha on nightly See [rust-lang/compiler-team#](rust-lang/compiler-team#1015) The first commit here adds an `-Zpolonius=nll` argument for tests and so people can disable alpha on nightly.
…enkov perf: Lock-free root fast paths for hygiene queries `normalize_to_macros_2_0`, `normalize_to_macro_rules` and `outer_expn_is_descendant_of` take the `HygieneData` lock even for the root syntax context, the common case, where the answer is fixed: the root normalizes to itself, and everything descends from the root expansion. This PR avoids the lock, like the existing fast paths in `ExpnId::is_descendant_of`.
Reachable cleanups A few small dataflow analysis cleanups related to reachability. Details in individual commits. r? @cjgillot
Update cargo submodule 21 commits in 7c83d4cc0953b81d823e47d640c64da9b8bd4fac..c79e8f89441b3e73d6d65d125c0c745792808c74 2026-07-29 21:34:53 +0000 to 2026-08-04 19:17:33 +0000 - fix(diag): Ensure diagnostic titles work without snippets (rust-lang/cargo#17304) - refactor: Remove unnecessary mut in sources (rust-lang/cargo#17305) - feat(trim-paths): emit unremap files for final artifacts (rust-lang/cargo#17303) - fix: prevent panic when `package.build` is empty (rust-lang/cargo#17268) - Add a suggestion when adding `[lints]` to a workspace to use `[workspace.lints]` instead (rust-lang/cargo#17300) - chore(deps): update embarkstudios/cargo-deny-action action to v2.1.1 (rust-lang/cargo#17291) - refactor: move sysroot lookup to GlobalContext (rust-lang/cargo#17276) - fix(trim-paths): unambiguous and reversible remap rules (rust-lang/cargo#17302) - Avoid parsing unchanged lockfiles (rust-lang/cargo#17301) - Remove unnecessary to_path_buf (rust-lang/cargo#17295) - chore(deps): update cargo-semver-checks to v0.50.0 (rust-lang/cargo#17297) - chore(deps): update actions/checkout action to v6.1.0 (rust-lang/cargo#17290) - Remove unnecessary return at end of functions (rust-lang/cargo#17292) - make __CARGO_TEST_FORCE_ARGFILE available in distributed builds (rust-lang/cargo#17293) - Fix manual_readme lint for lower-priority README files (rust-lang/cargo#17208) - fix(git): make checkout names independent of git config (rust-lang/cargo#17289) - fix(diag): Rename redundant_readme to manual_readme (rust-lang/cargo#17288) - Remove redundant double call .to_string() (rust-lang/cargo#17286) - fix(completions): complete paths for cargo run arguments (rust-lang/cargo#17284) - test(git): exercise multi git revision lockfile (rust-lang/cargo#17279) - add context to lints documentation (rust-lang/cargo#17273) r? ghost
…t_solver, r=lcnr,bit-aloo session: Enable next-solver globally for assumptions-on-binders Zulip: https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/assumptions.20on.20binders.3A.20enable.20next-solver.20automatically/with/614548133 `-Zassumptions-on-binders` already needs the next trait solver, but you still had to pass `-Znext-solver` by hand. Easy to forget, and some spots (feature gates) read `next_solver.globally` directly, so just special-casing `next_trait_solver_globally()` wouldn't cut it. After `-Z` parsing, if assumptions-on-binders is on, force `NextSolverConfig { coherence: true, globally: true }`. Same pattern as `-Zretpoline-external-thunk`. Flag order doesn't matter. `-Znext-solver=no` gets overridden too; imo that's the right call since the assumptions code can't run on the old solver. A hard conflict error would also be fine, just more annoying for day-to-day hacking. Covered the flag alone, both orderings, and `=no` in a unit test. Dropped the explicit `-Znext-solver` from one UI test under `assumptions_on_binders`. btw idk if we should strip `-Znext-solver` from the rest of that folder asap or leave the redundancy. irl I'd leave it for now. fyi this also means anything checking `next_solver.globally` sees the effective config. ltm if you'd rather go the conflict-error route instead of overriding `=no`.
[perf] Reuse existing trait reference instead of recreating it. Effectively, do one step of common subexpression elimination, manually. We can reuse the existing interned reference made a few lines prior, without needing to recreate it. r? @lcnr **AI disclosure:** The optimization opportunity here was discovered as part of a systematic probe for missed optimizations using a combination of both traditional and AI tools. The code here was initially prototyped and vetted by AI tools, followed by additional manual work. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better than if no AI tools were in the loop.
This updates the rust-version file to 969b803cbe1d4499f841ae0a49c637d8c70a0458.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@969b803 Filtered ref: ed111c2 Upstream diff: rust-lang/rust@da86f4d...969b803 This merge was created using https://github.com/rust-lang/josh-sync.
github-actions
Bot
force-pushed
the
rustc-pull
branch
from
August 10, 2026 04:42
396e4b3 to
eff41ca
Compare
tshepang
enabled auto-merge
August 11, 2026 08:43
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.
Latest update from rustc.