Repository navigation
Merge subtree update for toolchain nightly-2026-10-12 - #732
Merged
Merged
Conversation
…ked, r=LawnGnome implement (OnceLock,LazyLock)::(get_unchecked,get_unchecked_mut) Tracking issue: rust-lang#162716 Based on the original work of @HomelikeBrick42 from rust-lang#138914.
…cs, r=nia-e Make it clear what the alignment needs to be for `deallocate` As noticed on [zulip](https://rust-lang.zulipchat.com/#narrow/channel/197181-t-libs.2Fwg-allocators/topic/Question.3A.20layout.20alignment.20for.20Allocator.3A.3Adeallocate.28.29/with/626111397), this is insufficiently precise r? clarfonthey
Co-authored-by: Boxy <rust@boxyuwu.dev>
…Titor std: Update `wasip3` crate dependency Keeping it up-to-date and resolving minor issues with it.
rename direct_const_arg! to gca! Also re-export it from `std`, and make most tests `use std::gca;` rather than writing out `core::` every time the macro is called. Part of the design rework discussed in Zulip [#project-const-generics > talkies at last @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/260443-project-const-generics/topic/talkies.20at.20last/near/620368825) r? @BoxyUwU
Fix Typo in `std::sys::process::unix::unsupported::wait_status` Docs Noticed while collecting data on conditional compilation for potential aliasing (see [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Using.20.60build.2Ers.60.20for.20cfg.20aliases.20in.20.60std.60/with/625458363) for details) that this attribute was missing its closing brace. Extremely trivial, might as well fix it!
…bit, r=tgross35 Fix flt2dec build on 16-bit targets Closes rust-lang#163158. Fixes build breakage rust-lang#162879 on the two 16-bit targets, `avr-none` and `msp430-none-elf`, by including `target_pointer_width = "16"` in all the cfg attributes for the u32 implementations for bignum and flt2dec.
…t-tests improve simd bitshift tests
Pull from rust-lang/rust
FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
This reverts commit 95d43bf. Now that closures have field retagging again, we need this MaybeDangling again.
…r, r=Darksonn Add `inline` attribute to `NonZero::from_str` `<integer>::from_str`, `T::from_str_radix`, `T::from_ascii_bytes`, and `T::from_ascii_bytes_radix` has the `inline` attribute, buy `NonZero::from_str` does not.
…nthey std::thread::available_parallelism merging linux/android/freebsd version FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
Adjust implementation to reduce MIR generated.
…thlin give noalias back to refs in closures Reverts parts of rust-lang#160745 to fix rust-lang#163220. Needs team approval; FCP is happening in rust-lang#163220.
…r, r=scottmcm
Refactor `core::cmp::{smallest, largest}` & add `mir-opt` test
Tracking Issue: rust-lang#160728
# Description
Based on [this](rust-lang#160687 (comment)) feedback from the initial implementation, I've added a `mir-opt` test to highlight the amount of MIR added by using a variadic `min` implementation. ~~To my knowledge, there isn't a way to actually test the MIR generated by the actual implementation in `core`, so I've replicated a smaller representative sample in a test instead. Please see [GodBolt](https://godbolt.org/z/1qGzboeo3) for a more detailed comparison between the (unoptimised) MIR for the current and splatted versions of `min` (`max` omitted since it's identical).~~
~~In short, the splat version does produce more MIR, especially for the additional trait implementations for larger tuple sizes. However, the added MIR almost exclusively comes from the indirection of calling a method on a trait, and not specifically the `#[rustc_splat]` variadic implementation. Because of this, it may be worth considering a MIR pass which could inline this kind of static dispatch.~~
Moving to a pre-codegen test with some MIR optimisation has narrowed the gap between `smallest` and `min` to basically nothing (an extra scope from the looks of it). I'm guessing the chained `a.min(b).min(c).min(d)` style (with a lack of explicit temporaries) is something MIR is able to readily optimise!
From experimenting with this test, I also found a simpler way to implement `smaller` and `larger`. The most notable difference is instead of passing all arguments through the splat, I've pulled out the first argument so they aren't de/tupled. It improves codegen slightly, but more importantly simplifies the macro implementation.
---
## Notes
- No AI tooling of any kind was used during the creation of this PR.
…richton Mark `std::os::wasip2` with correct doc-cfgs, mark as unstable r? @alexcrichton So, initially went through a bit thinking this was secretly stable since Rust 1.78.0 but it turns out that rustdoc was just not displaying this correctly, as it wasn't set up like the other modules. Even though this can't actually be accessed without the `wasip2` feature (I think), I decided to mark it as unstable anyway just to be safe, since it's more correct for docs anyway.
…nathanBrouwer Rollup of 14 pull requests Successful merges: - rust-lang#162976 (fix quadratic naming of duplicate sidebar links) - rust-lang#161275 (Refactor `core::cmp::{smallest, largest}` & add `mir-opt` test) - rust-lang#163143 (cg_llvm: Use fewer FFI calls to check the target CPU's features) - rust-lang#163188 (Adjust for Arm64EC name mangling when checking for exported symbols) - rust-lang#163211 (`rustc_builtin_macros` cleanup, part 6) - rust-lang#161386 (Don't merge distinct impl candidates) - rust-lang#162942 (Remove `StashKey::AssociatedTypeSuggestion`) - rust-lang#163096 (Don't suggest `std::` rustfix paths in `#![no_std]` crates) - rust-lang#163110 (Mark `std::os::wasip2` with correct doc-cfgs, mark as unstable) - rust-lang#163185 (properly decrement available_depth on cycles and provisional cache hits) - rust-lang#163214 (revert r14 register names for arm) - rust-lang#163226 (miri subtree update) - rust-lang#163228 (Add regression test for trait predicate with escaping bounds) - rust-lang#163234 (`rustc_dump_symbol_name`: add demangling information as a note instead)
Tracking issue: rust-lang#61695
…JohnTitor Updates the expect message library/core/src/time.rs updates the expect message in library/core/src/time.rs. Updated to show the expected state instead of what actually happened. rust-lang#159751
…they
Make `NonNull::{read,write}_volatile` unstably const.
rust-lang#159092 added `const` to the functions `read_volatile` and `write_volatile` for `core::ptr`, `*const T`, and `*mut T`. This PR expands that to `NonNull<T>`, under the same feature `const_volatile`.
Tracking issue: rust-lang#159094
cc @RalfJung
…larfonthey Stabilize `ptr::try_cast_aligned` Stablization PR for `pointer_try_cast_aligned` **FCP not accepted yet**. Tracking issue: rust-lang#141221
…rfonthey std: remove unnecessary sysctl caching on FreeBSD The `install_main_guard` function is only called once, so there is no use in caching the value returned from the `sysctlbyname`.
…rfonthey Don't rely on `Global` handing out dangling pointers This code is incorrect and will leak memory once the global allocator supports zero-sized allocations, since `Box` doesn't deallocate zero-sized layouts
…ibute, r=bushrat011899 Add documentation for the `crate_name` attribute Add documentation for the `crate_name` attribute <!-- homu-ignore:start --> Briefly introduces how the attribute works, and things to be careful of when using the attribute. Part of rust-lang#157604
Rollup of 4 pull requests Successful merges: - rust-lang#163434 (Add documentation for the `crate_name` attribute) - rust-lang#163917 (Re-enable extension of bool return values on x86_64) - rust-lang#163242 (Expose regular argument attributes in rustc_public) - rust-lang#164071 (cg_llvm: Avoid all remaining uses of `as_c_char_ptr`)
…a-kruppe Replace `Unique` in `Box` with a `(NonNull, PhantomData)` wrapper Follow-up to rust-lang#162804 See [zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Can.20we.20nuke.20.60Unique.60.3F/with/624141418). This is only the first step in actually refactoring `Box`, and is essentially just a rename. The layout of `Box` stays as-is for now, due to rust-lang#162850. Needs perf run
* thread::LocalKey: document meaning of 'inner' function argument * nit Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
…oboet thread::LocalKey: document meaning of 'inner' function argument rust-lang#92123 gave this function an argument, but without documenting what the argument means or does. I hope I reverse engineered this correctly. Cc @m-ou-se @joboet
remove redundant unsafe Related Zulipchat topic link: [Safety requirements of ARM hint APIs](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Safety.20requirements.20of.20ARM.20hint.20APIs/with/629609101) This PR tries to remove the unsafe in `core_arch/arm_shared/hint.rs`. As the Zulip topic discussed, these APIs have `#[cfg(any(...))]` attribute to restrict that these can only be compiled when specific architecture is met. So there seems no need to mark these APIs unsafe. For `__nop`, I found that in `riscv_shared` there exist the same `nop` instruction, but it is marked safe. The concrete path is `core_arch/src/riscv_shared/mod.rs` ```rust /// Generates the `NOP` instruction /// /// The NOP instruction does not change any architecturally visible state, except for /// advancing the `pc` and incrementing any applicable performance counters. #[inline] #[unstable(feature = "riscv_ext_intrinsics", issue = "114544")] pub fn nop() { unsafe { asm!("nop", options(nomem, nostack, preserves_flags)); } } ``` But there is a remaining question: For `wfe` and `wfi`, they can be configurable to trap. So I think if needed, I can complement some discription about trap. Hoping you can give me some suggestion.
fast path for BTreeMap::Iter::next `BTreeMap::Iter` currently obtains the next kv through leaf navigation even when the next kv is in the same node. This PR adds fast paths for `BTreeMap::Iter` and `BTreeMap::Range`: when advancing does not cross a node boundary, the next edge and kv handle are constructed directly from their indexes. Result on aarch64: - map::iteration benchmark | baseline ns/iter | new ns/iter | change -- | -- | -- | -- map::iteration_20 | 362.74 ± 3.80 | 116.60 ± 1.46 | -67.9% map::iteration_1000 | 18743.31 ± 166.97 | 7181.88 ± 91.56 | -61.7% map::iteration_100000 | 2048028.00 ± 38646.50 | 893023.00 ± 6601.05 | -56.4% map::iteration_rev_20 | 398.15 ± 6.02 | 111.56 ± 1.24 | -72.0% map::iteration_rev_1000 | 19650.95 ± 120.38 | 6719.33 ± 33.38 | -65.8% map::iteration_rev_100000 | 2045171.75 ± 88630.03 | 826631.00 ± 7210.95 | -59.6% map::iteration_mut_20 | 332.97 ± 3.07 | 116.83 ± 9.19 | -64.9% map::iteration_mut_1000 | 17282.91 ± 142.66 | 7105.18 ± 64.92 | -58.9% map::iteration_mut_100000 | 1872307.50 ± 116359.10 | 930589.50 ± 11501.75 | -50.3% map::iteration_mut_rev_20 | 314.35 ± 5.69 | 99.88 ± 4.46 | -68.2% map::iteration_mut_rev_1000 | 16153.08 ± 77.67 | 6333.19 ± 9.81 | -60.8% map::iteration_mut_rev_100000 | 1863366.00 ± 90111.10 | 832836.00 ± 13949.30 | -55.3% - map::range_iteration Benchmark | Baseline (ns/iter) | New (ns/iter) | Change -- | -- | -- | -- map::range_iteration_20 | 380.62 ± 4.55 | 99.54 ± 1.49 | -73.8% map::range_iteration_1000 | 18,545.75 ± 193.17 | 5,870.29 ± 66.97 | -68.3% map::range_iteration_100000 | 1,886,226.50 ± 7,167.85 | 606,092.00 ± 5,516.90 | -67.9% map::range_iteration_rev_20 | 354.25 ± 3.59 | 98.63 ± 4.56 | -72.2% map::range_iteration_rev_1000 | 16,976.08 ± 186.23 | 5,604.28 ± 104.99 | -67.0% map::range_iteration_rev_100000 | 1,717,588.50 ± 6,813.65 | 579,875.00 ± 6,914.20 | -66.2% map::range_iteration_mut_20 | 336.01 ± 14.14 | 94.51 ± 2.88 | -71.9% map::range_iteration_mut_1000 | 15,517.95 ± 218.64 | 5,095.03 ± 44.77 | -67.2% map::range_iteration_mut_100000 | 1,604,837.00 ± 12,474.30 | 510,776.50 ± 1,607.21 | -68.2% map::range_iteration_mut_rev_20 | 293.22 ± 4.60 | 86.87 ± 0.85 | -70.4% map::range_iteration_mut_rev_1000 | 13,705.48 ± 126.54 | 5,035.34 ± 34.81 | -63.3% map::range_iteration_mut_rev_100000 | 1,393,440.00 ± 5,983.90 | 517,439.50 ± 4,770.85 | -62.9% - map::first_and_last Benchmark | Baseline (ns/iter) | New (ns/iter) | Change -- | -- | -- | -- map::first_and_last_0_nightly | 21.06 ± 0.44 | 21.05 ± 0.22 | -0.0% map::first_and_last_0_stable | 42.63 ± 1.34 | 42.53 ± 0.94 | -0.2% map::first_and_last_100_nightly | 47.77 ± 1.22 | 46.62 ± 0.60 | -2.4% map::first_and_last_100_stable | 302.27 ± 1.00 | 126.24 ± 4.89 | -58.2% map::first_and_last_10k_nightly | 73.27 ± 1.01 | 73.22 ± 0.92 | -0.1% map::first_and_last_10k_stable | 368.89 ± 4.71 | 172.73 ± 2.44 | -53.2% - set Benchmark | Baseline (ns/iter) | New (ns/iter) | Change -- | -- | -- | -- set::difference_random_100_vs_100 | 2,932.50 ± 5.08 | 1,377.14 ± 20.87 | -53.0% set::difference_random_100_vs_10k | 2,864.22 ± 9.71 | 2,294.26 ± 6.83 | -19.9% set::difference_random_10k_vs_100 | 193,483.00 ± 1,447.92 | 94,580.40 ± 1,345.45 | -51.1% set::difference_random_10k_vs_10k | 296,728.67 ± 2,560.70 | 145,264.67 ± 1,775.17 | -51.0% set::difference_staggered_100_vs_100 | 2,896.54 ± 10.72 | 1,477.26 ± 14.43 | -49.0% set::difference_staggered_100_vs_10k | 3,443.02 ± 72.13 | 2,715.43 ± 25.13 | -21.1% set::difference_staggered_10k_vs_10k | 293,658.33 ± 897.93 | 152,474.25 ± 2,005.09 | -48.1% set::intersection_100_neg_vs_100_pos | 14.39 ± 0.04 | 14.12 ± 0.14 | -1.9% set::intersection_100_neg_vs_10k_pos | 17.77 ± 0.06 | 17.63 ± 0.06 | -0.8% set::intersection_100_pos_vs_100_neg | 14.44 ± 0.06 | 13.99 ± 0.14 | -3.1% set::intersection_100_pos_vs_10k_neg | 17.72 ± 0.22 | 17.38 ± 0.03 | -1.9% set::intersection_10k_neg_vs_100_pos | 17.21 ± 0.07 | 17.16 ± 0.21 | -0.3% set::intersection_10k_neg_vs_10k_pos | 19.56 ± 0.11 | 19.38 ± 0.18 | -0.9% set::intersection_10k_pos_vs_100_neg | 17.08 ± 0.07 | 16.94 ± 0.17 | -0.8% set::intersection_10k_pos_vs_10k_neg | 19.42 ± 0.05 | 19.20 ± 0.22 | -1.1% set::intersection_random_100_vs_100 | 2,765.31 ± 19.46 | 1,250.69 ± 7.81 | -54.8% set::intersection_random_100_vs_10k | 3,149.91 ± 11.38 | 2,536.46 ± 43.26 | -19.5% set::intersection_random_10k_vs_100 | 3,140.24 ± 40.56 | 2,549.25 ± 46.99 | -18.8% set::intersection_random_10k_vs_10k | 280,063.67 ± 1,732.87 | 135,042.57 ± 1,463.94 | -51.8% set::intersection_staggered_100_vs_100 | 2,911.66 ± 21.58 | 1,556.65 ± 19.25 | -46.5% set::intersection_staggered_100_vs_10k | 3,082.33 ± 6.55 | 2,555.09 ± 18.25 | -17.1% set::intersection_staggered_10k_vs_10k | 294,074.33 ± 2,705.90 | 164,741.10 ± 650.57 | -44.0% set::is_subset_100_vs_100 | 2,804.09 ± 6.16 | 1,025.71 ± 9.23 | -63.4% set::is_subset_100_vs_10k | 2,343.67 ± 21.98 | 1,832.94 ± 30.82 | -21.8% set::is_subset_10k_vs_100 | 2.35 ± 0.01 | 2.46 ± 0.07 | +4.7% set::is_subset_10k_vs_10k | 274,705.33 ± 381.00 | 102,497.67 ± 1,043.56 | -62.7%
feliperodri
approved these changes
Oct 21, 2026
rajath-mk
approved these changes
Oct 22, 2026
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-11 (rust-lang/rust@6f5da40) to 2026-10-12 (rust-lang/rust@080cc27), inclusive. This is a clean merge, no conflicts were detected. Do not remove or edit the following annotations:
git-subtree-dir: library
git-subtree-split: 3174811