Repository navigation
Merge subtree update for toolchain nightly-2026-10-22 - #737
Open
github-actions[bot] wants to merge 10000 commits into
Open
github-actions[bot] wants to merge 10000 commits into
github-actions[bot] wants to merge 10000 commits into
Conversation
Co-authored-by: Augie Fackler <augie@google.com>
The semantics of `intrinsics::abort()` are closer to what we have unstably as `abort_immediate()` than to `process::abort()` or `libc::abort()`. Rename it to make more clear that the intrinsic is more of an intentional crash with platform-specific behavior than what `libc::abort()` tries to be (i.e. raising `SIGABRT`).
Update the minimum external LLVM to 22 With this change, we'll have stable support for LLVM 22 and 23. For reference, the previous increase to LLVM 21 was rust-lang#153684. cc @rust-lang/wg-llvm @durin42 r? nikic
…update, r=clarfonthey
Docs - type guarantees update
**Content:**
- Pin::map_unchecked | Safety section update
- String::reserve, String::reserve_exact | Panic section update
- Saturating | Introduce Layout section
- Fix typos
**Questions:**
1. This proposes to update String reserve methods docs:
> Panics if the new capacity overflows [`usize`].
->
> Panics if the new capacity exceeds [`isize::MAX`] bytes.
There are a few other types that are based on Vec and offer similar reserve API (like BinaryHeap).
Should they be updated, too?
ACP: ~~rust-lang/libs-team#482 [not required]
…docs, r=RalfJung Distinguish `repr(C)` ZSTs from others in ABI compatibility rules FCP: rust-lang#157973 (comment) (Split out from compiler implementation in rust-lang#156112) Some C ABIs pass and return ZSTs by pointer. But `()` should never be returned by pointer, as it must match `void`. To account for this, we have to weaken the present guarantee of "any two types with size 0 and alignment 1 are ABI-compatible" to exclude `repr(C)`. [t-lang nomination summary comment](rust-lang#157973 (comment)) Fixes rust-lang/unsafe-code-guidelines#552; see also rust-lang#78586, rust-lang#155299. Also related to rust-lang#155984. @rustbot label T-lang A-ABI needs-fcp
…r=clarfonthey intrinsics: Rename `abort` to `abort_immediate` The semantics of `intrinsics::abort()` are closer to what we have unstably as `abort_immediate()` than to `process::abort()` or `libc::abort()`. Rename it to make more clear that the intrinsic is more of an intentional crash with platform-specific behavior than what `libc::abort()` tries to be (i.e. raising `SIGABRT`). If desired, a new intrinsic like `abort_gracefully` could be introduced that performs platform-specific behavior. This would more cleanly unblock rust-lang#149780. See also discussion at the tracking issue for `immediate_abort` rust-lang#154601.
These functions should follow aapcs, so a strictly asm version shouldn't be needed. This resolves some of the ugliness of reading HAVE_LSE_ATOMICS and enabling bti on various targets. When compiled with opt-level=1 or higher, these produce nearly identical asm on linux with minor changes to register choices loading HAVE_LSE_ATOMICS.
I can't find a native mechanism in Rust to zero-extend the pointers on ilp32 targets. zero-extend the arguments on entry to each asm! usage. This isn't perfect, but it should be correct.
…s, r=JohnTitor
core: io: clean `unused_variables` lint under `no_io_statics`
When building `core` with `--cfg no_io_statics`, the compiler warns:
error: unused variable: `f`
--> .../library/core/src/io/error/os_functions.rs:9:36
|
9 | pub(super) unsafe fn set_functions(f: &'static OsFunctions) {
| ^ help: if this is intentional, prefix it with an underscore: `_f`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
Thus clean it up.
---
If the signature is preferred to be exactly the same one as the `os_functions_atomic.rs` one, then we could `allow` it instead.
loongarch: Use LLVM intrinsics for vdiv/vmod
…ations Fix the nvptx f16x2 intrinsic annotations
Fix test-tidy review changes review changes review changes fix llvm build ignore attribute documentation example fix tidy use no_run instead of ignore
…on, r=Mark-Simulacrum core: fix the docs of PanicInfo::location After `core::panic::PanicInfo` and `std::panic::PanicHookInfo` [were split](rust-lang#115974), the docs for `location` still showed incorrect usage of `std::panic::set_hook` for `core::panic::PanicInfo` location, leftover from before the split. Also notes for location methods of `PanicInfo` and `PanicHookInfo` were updated, explaining that if it is ever changed to return None, it should be addressed where the location is created and where it's unwrapped, to avoid unexpected behavior when callers may expect to always receive location. - For `PanicInfo`, `panic_fmt` builds it, and `panic_handler` unwraps it. - For `PanicHookInfo`, `panic_with_hook` builds it, and `default_hook` unwraps it. Addresses: rust-lang#128788 @rustbot label +A-docs r? libs
…imulacrum document safety requirements for atomic intrinsics This PR serves as a complement to PR rust-lang#162854 by adding safety docs for the remaining atomic operations. These operations pass raw pointers as arguments and are marked unsafe, so I think it is necessary to explain why they are unsafe. For `atomic_cxchg`, `atomic_cxchgweak`, `atomic_xchg`, these APIs have the same process whether `T` is an integer or a pointer type. For `atomic_xadd`, `atomic_xsub`, `atomic_and`, `atomic_or`, `atomic_xor`, these APIs correspond to different operations in `core/src/sync/atomic.rs` for `T` is an integer or a pointer type. For `atomic_max`, `atomic_min`, `atomic_umax`, `atomic_umin`, they only process when `T` is an integer (signed or unsigned) type. For `atomic_nand`, there doesn't exist a method in `AtomicPtr<T>`, so I don't link the related method.
…the-same, r=clarfonthey Don't imply incorrect things about `Global` in the docs of `System` The global allocator has a lot more asterisks to it than we let on in the docs of `System` r? libs
…acrum Add safety comments for alloc::str This PR replace `// ignore-tidy-undocumented-unsafe` with concrete safety comments. Every `// ignore-tidy-undocumented-unsafe` in `alloc::str` is checked. This PR only contains a file for ease of review. Besides, this PR breaks an `unsafe block` into finer-grained scopes for ease of check.
…k-Simulacrum Mark Rc strong/weak count methods must_use The corresponding Arc methods are already must_use. At a glance, missing them on Rc looks like an oversight.
…tests, r=clarfonthey fs::set_permissions_nofollow: Android support, test cleanup Tracking issue: rust-lang#141607 try-job: *various* try-job: *android*
…ark-Simulacrum Add `SplitPathsRef` implementation for motor to make std build Fixes rust-lang#163577 We don't have CI or bors runners for this target I presume, but I checked using rust-analyzer that all the imports now resolve here.
…rk-Simulacrum Move media & home dirs tests to fs tests. Fixes rust-lang#163591. The home and media directory tests do not directly interact with the filesystem, but their test helper does via `crate::env::current_dir()`. Therefore, these tests fail on SGX and probably on other targets that do not have filesystem support. This PR moves those tests to `fs/tests.rs`, which is excluded on targets without filesystem support.
…Mark-Simulacrum Finalize changes on expect messages for library/core/src/fmt/mod.rs Related Issue: rust-lang#159751 Updates expected messages in library/core/src/fmt/mod.rs to follow style guide
Wire up runtime detection for both features: add them to the `is_x86_feature_detected!` feature list (gated on `movdir64b_target_feature` and `movdiri_target_feature`), enable them from CPUID leaf 7 ECX bits 28 and 27, and add them to the std_detect x86-specific dump test.
arch::breakpoint: avoid confusing 'equivalent' terminology Cc @tgross35 @joshtriplett
…php, r=jhpratt Stabilize `slice_split_once` Closes rust-lang#112811 (passed FCP there) r? libs
This will allow e.g. `&[!]` to satisfy `&[T] where T: AsRef<str>`. It follows the recommendation from the never documentation: > When writing your own traits, `!` should have an `impl` whenever > there is an obvious `impl` which doesn’t `panic!`. -- <https://doc.rust-lang.org/1.97.1/std/primitive.never.html#-and-traits> A class of use case for these impls is: * some code is generic over `T: AsRef<SomeOtherType>`, * and is still useful in the case where there are no `T`s, because it takes `Option<T>` or `&[T]` or any other input that can be empty or never-called, yet still do things with other inputs, in which case providing `T = !` is slightly better than the alternative of providing an inhabited placeholder type, because it ensures that the generic code is compiled with knowledge of the fact that that there will never be any `T`s, even if the specific code that cares about whether there are any `T`s doesn’t get inlined into the call site that doesn’t provide any `T`s. The test tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs had to be updated because it depended on this impl not existing. I’ve confirmed that the modified test still functions as a regression test by compiling it in nightly-2022-08-28 and seeing it ICE.
…=JohnTitor core: Add examples and assembly tests for `abort_immediate` This isn't the most complicated function, but it currently isn't used anywhere in-tree (typically `intrinsics::abort` is used instead) and there are no examples or tests. Copy the examples from `abort` since this should behave similarly, and also cover it in an assembly test. We don't really need the assembly check for any guarantees but it is handy to reference what the intrinsic actually does, and will let us know if anything changes. I also added tests for `breakpoint` on more platforms since these were easy to do together. Tracking issue: rust-lang#154601
Add more documentation for `chroot`, including an example and a manpage link As requested in rust-lang#163067 . This adds an example, adds a manpage link, adds a mention that it requires privileges, and adds an explanation that POSIX doesn't *require* it to be async-signal-safe but it's safe in practice on our targets.
Rollup of 5 pull requests Successful merges: - rust-lang#164672 (Bump `rustls-webpki` to 0.103.16 and `webpki-roots` to 1.0.10) - rust-lang#163575 (core: Add examples and assembly tests for `abort_immediate`) - rust-lang#163338 (MIR move elimination [4/6]: MoveElimination) - rust-lang#163180 (Add more documentation for `chroot`, including an example and a manpage link) - rust-lang#164638 (Make mir-opt blessing work again)
* doc: added addtional docs for Write Signed-off-by: Gauravpawar101 <Gauravpawar2522@gmail.com> * fix: correct docs for fmt write Signed-off-by: Gauravpawar101 <Gauravpawar2522@gmail.com> * doc: edit string.rs fmt docs
Implement `AsMut<T>` and `AsRef<T>` for `!`. This will allow e.g. `&[!]` to satisfy `&[T] where T: AsRef<str>`. It follows the recommendation from the never documentation: > When writing your own traits, `!` should have an `impl` whenever there is an obvious `impl` which doesn’t `panic!`. — <https://doc.rust-lang.org/1.97.1/std/primitive.never.html#-and-traits> A class of use case for these impls is: * some code is generic over `T: AsRef<SomeOtherType>`, * and is still useful in the case where there are no `T`s, because it takes `Option<T>` or `&[T]` or any other input that can be empty or never-called, yet still do things with other inputs, in which case providing `T = !` is slightly better than the alternative of providing an inhabited placeholder type, because it ensures that the generic code is compiled with knowledge of the fact that that there will never be any `T`s, even if the specific code that cares about whether there are any `T`s doesn’t get inlined into the call site that doesn’t provide any `T`s. --- The test `tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs` had to be updated because it depended on this impl not existing. I’ve confirmed that the modified test still functions as a regression test by compiling it in nightly-2022-08-28 and seeing it ICE. Tracking issue for never: rust-lang#35121 (This change has no ACP or tracking issue of its own; I assume it is simple enough that T-libs-api can just accept or reject this PR, and the implementation will be stable when `!` is stable.) @rustbot label -T-libs +T-libs-api +F-never_type
…attribute, r=JohnTitor Document the `recursion_limit` built-in attribute Document the `recursion_limit` built-in attribute in std via `#[doc(attribute = "recursion_limit")]`, covering: - what the limit applies to (macro expansion, auto-dereference) - the default (128) and how to raise it - the diagnostics produced when the limit is reached - a note on when raising it is appropriate As claimed in rust-lang#157604 (comment). Part of rust-lang#157604.
…=JohnTitor doc: added addtional docs for Write ## Changes - Added docs for `Write` with example. Close rust-lang#164466
…de, r=JohnTitor stabilize ExitCodeExt for Windows Passed FCP in rust-lang#111688 (comment) Closes rust-lang#111688
…rksonn re-enable test_dir_remove_dir test on QNX This reverts rust-lang#163500. The comment on that test doesn't really make sense: rust-lang#153781 is about `remove_dir_all` under concurrent mutation. The test is about `remove_dir`, and there should be no concurrent mutation while testing. The actual problem is that the fallback implementation for `remove_dir` was buggy. (QNX has no directory handles so it uses a path-based fallback implementation.) I fixed that in rust-lang#163020. So now that the fallback implementation is fixed, we can re-enable the test on QNX. We don't test that fallback implementation at all in our CI, unfortunately. Cc @tshepang r? @Darksonn
Offload safe mutable args with `Region` and `PartitioningStrategy` Now `Region` are lang items and mapped as slices. ~needs rust-lang#156620 to work~ r? @ZuseZ4
…nathanBrouwer Rollup of 6 pull requests Successful merges: - rust-lang#164383 (handle higher-ranked preds in imperfect derives diagnostic) - rust-lang#164620 (Wrap expected_ty for cfi-{diag,recover} in with_no_trimmed_paths) - rust-lang#164684 (Remove redundant `PartialOrd` chaining methods) - rust-lang#158076 (Offload safe mutable args with `Region` and `PartitioningStrategy`) - rust-lang#164680 (Add regression test for async fn declared with #[eii]) - rust-lang#164696 (Add `#[default]` for `newtype_index!`)
feliperodri
approved these changes
Oct 23, 2026
The nightly-2026-10-22 subtree merge committed conflict markers around the NonNull struct header, so core failed to compile (unclosed delimiter) and took down every Kani, Flux, goto-transcoder and upstream_test job. Keep the Flux opaque attribute and take upstream's #[rustc_assert_variance(covariant)] on the type parameter.
Flux 6769bb9 targets nightly-2026-10-11 and cannot compile the 10-22 core (unknown #[rustc_assert_variance], borrowck ICE). Flux main 1b04d5e includes the 10-22 toolchain upgrade (flux-rs/flux#1847). Upstream renamed core::bstr to core::byte_str, so the include pattern src/bstr/*.rs matched nothing and Flux silently stopped checking those 118 functions (367 checked instead of 485). Point it at src/byte_str/*.rs. Local run: 485 checked, 35 constraints solved; the checked set equals main's after the rename.
feliperodri
approved these changes
Oct 23, 2026
feliperodri
enabled auto-merge
October 23, 2026 20:20
This branch has not been deployed
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-10-12 (rust-lang/rust@080cc27) to 2026-10-22 (rust-lang/rust@1a2c479) (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: 1ced796