Merge subtree update for toolchain nightly-2026-08-21 - #687
Open
github-actions[bot] wants to merge 10000 commits into
Open
Merge subtree update for toolchain nightly-2026-08-21#687github-actions[bot] wants to merge 10000 commits into
github-actions[bot] wants to merge 10000 commits into
Conversation
…arksonn std: fix stack buffer overflow in Windows junction_point The guard checked `data_len > u16::MAX`, allowing paths far larger than `PathBuffer` (a fixed 16384-element array), which the subsequent single `copy_from` then overflows. Bound against `MAXIMUM_REPARSE_DATA_BUFFER_SIZE` plus header instead, matching the kernel's limit.
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
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
…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
…tyle, r=jhpratt Update expect messages in tcp.rs doc examples to follow the style guide Related issue: rust-lang#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#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.
LLVM 21 preserves the bounds assumption but does not eliminate the aggregate phi that LLVM 22 removes. Check each version's supported optimization and restore the shared postcondition so direct callers can eliminate bounds checks.
…est, r=Urgau [rustdoc] Do not take `doc(cfg())` into account when filtering doctests Part of rust-lang#147033. Because it was using the `extract_cfg_from_attrs` common function, it was taking into account the `doc(cfg())` attributes the same as if they were a `cfg`. I didn't mark this PR as "fix" because I didn't handle the case of the doctest not being marked as ignored because I'm not sure if we should revisit the fact that we ignore these doctests or if we should just mark them as ignored (because of `target_feature(enable = "...")`). Setting @fmease as reviewer as they are likely the only one with context about this issue. 😆 r? @fmease
…tch-1, r=nia-e Reorder the methods in `#[rustc_must_implement_one_of]` So that their order will be the preferred order for implementations (assuming implementing `read_buf()` is better), like @joshtriplett said in rust-lang#106643 (comment). r? libs
This updates the rust-version file to f73951d.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@f73951d Filtered ref: rust-lang/compiler-builtins@30e5485 Upstream diff: rust-lang/rust@7fb284d...f73951d This merge was created using https://github.com/rust-lang/josh-sync.
Needed for the `__aeabi_u{read,write}*` symbols that we now require.
Cap socket send length to c_int::MAX on Apple targets On Apple, `send`/`sendto` reject a length larger than `c_int::MAX` with `EINVAL` instead of doing a short send. The send length was only clamped to `wrlen_t::MAX` (a no-op on 64-bit unix), so writing more than `c_int::MAX` bytes to a socket failed on macOS. Add a `MAX_SEND_LEN` cap (`c_int::MAX` on Apple, `wrlen_t::MAX` elsewhere), used in `write`, `send`, `send_to`, and `send_with_flags`. Fixes rust-lang#115325
Account for desugaring in method call move errors
When encountering a move error caused by a desugared method call, talk about the user-facing feature (`await`/`?`/`for`-loop), instead of only the internal API it got desugared to.
```
error[E0382]: use of moved value: `entry`
--> $DIR/moved-into-question-mark.rs:11:18
|
LL | for entry in fs::read_dir(".")? {
| ----- move occurs because `entry` has type `Result<DirEntry, std::io::Error>`, which does not implement the `Copy` trait
LL |
LL | let file_type = entry?.file_type()?;
| ------ `entry` moved due to usage in the question mark operator
...
LL | dbg!(entry?.file_name());
| ^^^^^ value used here after move
|
note: the question mark operator is expanded into a call to `branch`, which takes ownership of the receiver `self`, which moves `entry`
--> $SRC_DIR/core/src/ops/try_trait.rs:LL:COL
help: you could `clone` the value and consume it, if the following trait bounds could be satisfied: `DirEntry: Clone` and `std::io::Error: Clone`
|
LL | let file_type = entry.clone()?.file_type()?;
| ++++++++
```
Fix rust-lang#89567.
Update error message in documentation comments Fixes the `library/core/src/fmt/mod.rs` item in the rust-lang#159751 issue.
…from` * Add support for wrapping of the return value of delegation * Cleanups * Review: use `make_lang_item_qpath`
Fixes the builds of rustc and library/std for the L4Re target OS. A major change was done in linking binaries: The need for the L4Bender tool was removed and linking parameters are now fully configured in the rustc target config.
Pull in a patch that landed just recently but hasn't yet been backported. Without it, symcheck fails. Link: llvm/llvm-project#214465
Advance to after the first regression in `hypot` but before the second regression. See [1] for context on `hypot`. [1]: rust-lang/compiler-builtins#1249
they projected into a scalable vector, which hits assertions
ref mut const unstable matching ref vec, vecdeque: rename alloc to allocator staticallocator on ref mut as well wording will be the death of me words order words random word words random good eeeeeeeeeeeee oh yeah these need the bound
…=jackh726 Initial implementation of `FnPtr` trait This commit is an initial implementation of the `FnPtr` trait as described in the `fn_static` tracking issue, which consists of moving the internally unstable `core::marker::FnPtr` to `core::ops::FnPtr`, as well as changing the API. Because `NonNull` is used in the new `as_ptr` signature, it was also turned into a proper lang item. Part of `fn_static`: rust-lang#148768
std: use UNIX's `Instant` and `SystemTime` on Hermit Since rust-lang#154234 already shares UNIX's internal `Timespec` abstraction, `Instant` and `SystemTime` are just very thin wrappers over that. This shouldn't change any behaviour. CC @stepancheg CC @stlankes @mkroening
…ejrs Adding diagnostic item markers for multiple fs functions and structs A couple months ago there were a good number of TOCTOU/other filesystem lint issues created by @estebank in the clippy repo such as: * [`Path::metdata` after `Path::exists`](rust-lang/rust-clippy#17158) * [opening multiple files under a directory without using `open_at`](rust-lang/rust-clippy#17156) * [File deletion followed by file creation](rust-lang/rust-clippy#17153) * [File path comparison without canonicalizing](rust-lang/rust-clippy#17155) * [File creation followed by setting permissions](rust-lang/rust-clippy#17154) (There are more TOCTOU/filesystem bug lints that could be made aside from the list above, e.g. with symlinks). I was particularly interested in working on the last issue on file creation followed by setting permissions. However, I don't think I could start working on it without diagnostic items on filesystem functions like `fs::set_permissions` or `fs::create_dir_all`. I decided to put diagnostic item attributes on all the filesystem functions and a couple of the structs because they may be useful in creating clippy lints against TOCTOU bugs or other relevant filesystem operation bugs.
…r=oli-obk Remove fields from TypeKind: Struct, Enum, Union and Tuple Tracking issue rust-lang#146922 r? @oli-obk
…nthey Assorted allocator nitpicks Small things that got missed in rust-lang#157428, doc language cleanup for allocator, and a rename that closes rust-lang#158344. cc @rust-lang/wg-allocators. pending libs bikeshed decision on the naming of `into_raw_parts_with_alloc` r? clarfonthey
Doc: clarify how `Read::bytes` handling Interrupted errors Fixes rust-lang#161288
(cherry picked from commit 982c768)
* doc: list all remove_dir_all fallback targets * doc: restore original TOCTOU phrasing for remove_dir_all fallback list Keep the expanded platform list but drop the writer-facing "uses the fallback implementation" wording per review, restoring the original reason phrasing that explains protection is absent because the underlying platform lacks the required support. Co-authored-by: Md Muhtasim Munif Fahim <s1911024120@ru.ac.bd>
…loc-reenter-3, r=nia-e Ensure TLS accesses don't call the global allocator through panic (part 3) Follow-up to rust-lang#160976 Missed TLS code that is in a completely different module for some reason cc rust-lang#160930
…move-dir-all-docs, r=aapoalas doc: list all remove_dir_all fallback targets This adds the still-missing emove_dir_all fallback targets to the TOCTOU warning and updates the wording to describe the current implementation detail directly. Closes rust-lang#153781
vec: fixup the name that i forgot Forgot this in rust-lang#161115. per libs decision in rust-lang#158344
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.
This is an automated PR to merge library subtree updates from 2026-02-05 (rust-lang/rust@db3e99b) to 2026-08-21 (rust-lang/rust@8925ea3) (inclusive) into main.
git mergeresulted in conflicts, which require manual resolution. Files were commited with merge conflict markers. Do not remove or edit the following annotations:git-subtree-dir: library
git-subtree-split: 767896b