forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 52
Merge subtree update for toolchain nightly-2025-06-17 #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
github-actions
wants to merge
10,000
commits into
main
Choose a base branch
from
sync-2025-06-17
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…8472 Add `loongarch64` with `d` feature to `f32::midpoint` fast path This patch enables the optimized implementation of `f32::midpoint` for `loongarch64` targets that support the `d`feature. Targets with reliable 64-bit float support can safely use the faster and more accurate computation via `f64`, avoiding the fallback branchy version.
These are now provided by `compiler-builtins`, so there is no need to also build the C versions. This was detected by checking for duplicate symbols and not excluding weak symbols (like CI currently does).
This should be less error-prone and adaptable than the `nm` version, and have better cross-platform support without needing LLVM `nm` installed.
Since a working `nm` is no longer needed as part of CI, the rustup component can be removed.
Do the same for `builtins-test-intrinsics`. Mostly this means updating `extern` to `unsafe extern`, and fixing a few new Clippy lints.
As part of this, the u256 benchmarks are reorganized to a group.
Currently we only build this, but it is possible to run the binary. Change the CI script to do so here.
When multiple merges to `master` happen before a CI run completes, the in-progress job is getting canceled. Fix this by using the commit sha for the group key if a pull request number is not available, rather than `github.ref` (which is always `refs/head/master` after merge). This should prevent jobs running on previous commits from getting cancelled, while still ensuring there is only ever one active run per pull request.
We may soon want to use some new nightly features in `compiler-builtins` and `libm`, specifically `cfg_target_has_reliable_f16_f128` which was added in the past few weeks. This will mean we need a newer toolchain for benchmarks to continue building. Bump to the current latest nightly so we are not blocked on this down the line.
Currently we run logspace tests for extensive tests, but there isn't any reason we couldn't also run more kinds of tests more extensively (e.g. more edge cases, combine edge cases with logspace for multi-input functions, etc). As a first step toward making this possible, make `extensive` a new field in `CheckCtx`, and rename `QuickSpaced` to `Spaced`.
Clean up the separate `assert_f{16,32,64,128}` macros with a single `assert_biteq!` macro that works for all float widths.
As was mentioned at [1], we currently use `assert_approx_eq` for testing some math functions that guarantee exact results. Replace approximate assertions with exact ones for the following: * `ceil` * `floor` * `fract` * `from_bits` * `mul_add` * `round_ties_even` * `round` * `trunc` This likely wasn't done in the past to avoid writing out exact decimals that don't match the intuitive answer (e.g. 1.3 - 1.0 = 0.300...004), but ensuring our results are accurate seems more important here. [1]: rust-lang#138087 (comment)
The rounding tests are now supported, so there is no longer any reason to skip these.
`assert_eq!` ignores the sign of zero, but for any tests involving zeros we do care about this sign. Replace `assert_eq!` with `assert_biteq!` everywhere possible for float tests to ensure we don't miss this. `assert_biteq!` is also updated to check equality on non-NaNs, to catch the unlikely case that bitwise equality works but our `==` implementation is broken. There is one notable output change: we were asserting that `(-0.0).fract()` and `(-1.0).fract()` both return -0.0, but both actually return +0.0.
We don't actually need this for now, but eventually it would be nice to run icount benchmarks on multiple targets. Start tagging artifact names with the architecture, and allow passing `--tag` to `ci-util.py` in order to retrieve the correct one.
…llaumeGomez Rollup of 11 pull requests Successful merges: - rust-lang#137574 (Make `std/src/num` mirror `core/src/num`) - rust-lang#141384 (Enable review queue tracking) - rust-lang#141448 (A variety of improvements to the codegen backends) - rust-lang#141636 (avoid some usages of `&mut P<T>` in AST visitors) - rust-lang#141676 (float: Disable `total_cmp` sNaN tests for `f16`) - rust-lang#141705 (Add eslint as part of `tidy` run) - rust-lang#141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path) - rust-lang#141723 (Provide secrets to try builds with new bors) - rust-lang#141728 (Fix false documentation of FnCtxt::diverges) - rust-lang#141729 (resolve target-libdir directly from rustc) - rust-lang#141732 (creader: Remove extraenous String::clone) r? `@ghost` `@rustbot` modify labels: rollup
atomic_load intrinsic: use const generic parameter for ordering We have a gazillion intrinsics for the atomics because we encode the ordering into the intrinsic name rather than making it a parameter. This is particularly bad for those operations that take two orderings. Let's fix that! This PR only converts `load`, to see if there's any feedback that would fundamentally change the strategy we pursue for the const generic intrinsics. The first two commits are preparation and could be a separate PR if you prefer. `@BoxyUwU` -- I hope this is a use of const generics that is unlikely to explode? All we need is a const generic of enum type. We could funnel it through an integer if we had to but an enum is obviously nicer... `@bjorn3` it seems like the cranelift backend entirely ignores the ordering?
…fJung float: Replace some approximate assertions with exact As was mentioned at [1], we currently use `assert_approx_eq` for testing some math functions that guarantee exact results. Replace approximate assertions with exact ones for the following: * `ceil` * `floor` * `fract` * `from_bits` * `mul_add` * `round_ties_even` * `round` * `trunc` This likely wasn't done in the past to avoid writing out exact decimals that don't match the intuitive answer (e.g. 1.3 - 1.0 = 0.300...004), but ensuring our results are accurate seems more important here. [1]: rust-lang#138087 (comment) The first commit is a small bit of macro cleanup. try-job: aarch64-gnu try-job: x86_64-gnu-aux
Includes the following changes: * Enable `__powitf2` on MSVC [1] * Update `CmpResult` to use a pointer-sized return type [2] * Better code reuse between `libm` and `compiler-builtins` [3], [4] * Stop building C versions of `__netf2` [5] since we have our own implementation [1]: rust-lang/compiler-builtins#918 [2]: rust-lang/compiler-builtins#920 [3]: rust-lang/compiler-builtins#879 [4]: rust-lang/compiler-builtins#925 [5]: rust-lang/compiler-builtins#828
Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if` This new parameter was requested in the btree_extract_if tracking issue: rust-lang#70530 (comment) I attempted to follow the style used by `Vec::extract_if`. Before: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A> where K: Ord, F: FnMut(&K, &mut V) -> bool; } ``` After: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A> where K: Ord, R: RangeBounds<K>, F: FnMut(&K, &mut V) -> bool; } ``` Related: rust-lang#70530 — While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.
…ngjubilee Implement ((un)checked_)exact_div methods for integers tracking issue: rust-lang#139911 I see that there might still be some bikeshedding to be done, so if people want changes to this implementation, I'm happy to make those. I did also see that there was a previous attempt at this PR (rust-lang#116632), but I'm not sure why it got closed.
…39190, r=workingjubilee core: begin deduplicating pointer docs this also cleans up two inconsistancies: 1. both doctests on the ::add methods were actually calling the const version. 2. on of the ::offset methods was missing a line of clarification. part of rust-lang#139190
This commit improves the Clone trait documentation to address confusion around what "duplication" means for different types, especially for smart pointers like Arc<Mutex<T>>. Signed-off-by: xizheyin <[email protected]>
Revert "increase perf of charsearcher for single ascii characters" This reverts commit 245bf50 (PR rust-lang#141516). It caused a large `doc` perf. regression in rust-lang#141605.
…<str>::from_utf8*` methods Signed-off-by: xizheyin <[email protected]>
Use a consistent ordering for top-level manifest keys, and remove those that are now redundant (`homapage` isn't supposed to be the same as `repository`, and `documentation` automatically points to docs.rs now).
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#128425 (Make `missing_fragment_specifier` an unconditional error) - rust-lang#135927 (retpoline and retpoline-external-thunk flags (target modifiers) to enable retpoline-related target features) - rust-lang#140770 (add `extern "custom"` functions) - rust-lang#142176 (tests: Split dont-shuffle-bswaps along opt-levels and arches) - rust-lang#142248 (Add supported asm types for LoongArch32) - rust-lang#142267 (assert more in release in `rustc_ast_lowering`) - rust-lang#142274 (Update the stdarch submodule) - rust-lang#142276 (Update dependencies in `library/Cargo.lock`) - rust-lang#142308 (Upgrade `object`, `addr2line`, and `unwinding` in the standard library) Failed merges: - rust-lang#140920 (Extract some shared code from codegen backend target feature handling) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
Now that this repository is a subtree, we have no need to continue publishing `compiler-builtins`.
The config file is not needed anymore since compiler-builtins is no longer published. Removing it will resolve a CI failure.
…viper add Vec::peek_mut Tracking issue: rust-lang#122742
…r=RalfJung doc: mention that intrinsics should not be called in user code Intrinsic functions declared in `std::intrinsics` are an implementation detail and should not be called directly by the user. The compiler explicitly warns against their use in user code: ``` warning: the feature `core_intrinsics` is internal to the compiler or standard library --> src/lib.rs:1:12 | 1 | #![feature(core_intrinsics)] | ^^^^^^^^^^^^^^^ | = note: using it is strongly discouraged = note: `#[warn(internal_features)]` on by default ``` [**Playground link**] This PR documents what the compiler warning says: these intrinsics should not be used in user code. [**Playground link**]: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=1c893b0698291f550bbdde0151fd221b
Remove "intermittent" wording from `ReadDir` `ReadDir` claims that `next` will return an error "if there’s some sort of intermittent IO error during iteration". I'm really not sure what this was intended to mean but the implementations will simply return all OS errors encountered during iteration to the user. What else can they do? This is technically a change in the documented API but seeing as how it doesn't bear any relationship with the implementation I don't think it needs a libs-api fcp.
To prepare for merging from rust-lang/rust, set the version file to: d087f11 Auto merge of rust-lang#134841 - estebank:serde-attr-4, r=wesleywiser
…ub.com/rust-lang/rust Pull recent changes from rust-lang/rust via Josh. Upstream ref: d087f11 Filtered ref: 2d43ce8ac022170e5383f7e5a188b55564b6566a
Out-of-tree testing is broken with the most recent update from rust-lang/rust because it makes `compiler-builtins` depend on `core` by path, which isn't usually available. In order to enable testing outside of rust-lang/rust, add a new crate `builtins-shim` that uses the same source as `compiler-builtins` but drops the `core` dependency. This has replaced `compiler-builtins` as the workspace member and entrypoint for tests.
…riplett Delegate `<SocketAddr as Debug>` to `ByteStr` This allows UTF-8 characters to be printed without escapes, rather than just ASCII. r? ``@joshtriplett``
Unimplement unsized_locals Implements rust-lang/compiler-team#630 Tracking issue here: rust-lang#111942 Note that this just removes the feature, not the implementation, and does not touch `unsized_fn_params`. This is because it is required to support `Box<dyn FnOnce()>: FnOnce()`. There may be more that should be removed (possibly in follow up prs) - the `forget_unsized` function and `forget` intrinsic. - the `unsized_locals` test directory; I've just fixed up the tests for now - various codegen support for unsized values and allocas cc ``@JakobDegen`` ``@oli-obk`` ``@Noratrieb`` ``@programmerjake`` ``@bjorn3`` ``@rustbot`` label F-unsized_locals Fixes rust-lang#79409
float tests: deduplicate min, max, and rounding tests Part of rust-lang#141726 Best reviewed commit-by-commit. - Use `assert_biteq!` in the `mod.rs` tests. This requires some trickery to make shadowing macros with imports work. - The min, max, minimum, maximum tests in `tests/floats/f*.rs` are entirely subsumed by what we already have in `tests/float/mod.rs`, so I just removed them. - The rounding tests (floor etc) in `f*.rs` had more test points, so I copied them over. They didn't have `0.5` and `-0.5` though which seem like interesting points in particular regarding the sign of the resulting zero if that's what it sounds to, and they didn't max min/max/inf/nan tests, so this was really a merger of both tests. r? ``@tgross35``
Remove unneeded lifetime bound from signature of BTreeSet::extract_if One way to observe the difference between these signatures, using 0 explicit lifetimes and 0 contrived where-clauses: ```rust use std::collections::btree_set::{BTreeSet, ExtractIf}; use std::ops::RangeFull; fn repro( set: &mut BTreeSet<i32>, predicate: impl Fn(i32) -> bool, ) -> ExtractIf<i32, RangeFull, impl FnMut(&i32) -> bool> { set.extract_if(.., move |x| predicate(*x)) } ``` **Before:** ```console error[E0311]: the parameter type `impl Fn(i32) -> bool` may not live long enough --> src/lib.rs:8:5 | 5 | set: &mut BTreeSet<i32>, | ------------------ the parameter type `impl Fn(i32) -> bool` must be valid for the anonymous lifetime defined here... ... 8 | set.extract_if(.., move |x| predicate(*x)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `impl Fn(i32) -> bool` will meet its required lifetime bounds | help: consider adding an explicit lifetime bound | 4 ~ fn repro<'a>( 5 ~ set: &'a mut BTreeSet<i32>, 6 ~ predicate: impl Fn(i32) -> bool + 'a, 7 ~ ) -> ExtractIf<'a, i32, RangeFull, impl FnMut(&i32) -> bool> { | ``` **After:** compiles success. - Tracking issue: rust-lang#70530
Update the `compiler-builtins` subtree Update the Josh subtree to rust-lang/compiler-builtins@7c46e921c117. r? `@ghost`
…lexcrichton Remove wasm legacy abi Closes rust-lang#122532 Closes rust-lang#138762 Fixes rust-lang#71871 rust-lang#88152 Fixes rust-lang#115666 Fixes rust-lang#129486
Pick up the following pull requests: * ci: remove binary size check (not relevant in rust-lang/rust) <rust-lang/backtrace-rs#710> * Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions <rust-lang/backtrace-rs#718>
…enton Stabilize "file_lock" feature Closes rust-lang#130994 r? ```@joshtriplett```
…cs, r=tgross35 Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls I think it's not very obvious that `PathBuf`'s `Extend` and `FromIterator` impls work like `PathBuf::push`, so I think these should be documented. I'm not very happy with the wording and examples, open to suggestions :)
…ss35 Fix Debug for Location Fixes rust-lang#142279
…ngjubilee Update the `backtrace` submodule Pick up the following pull requests: * ci: remove binary size check (not relevant in rust-lang/rust) <rust-lang/backtrace-rs#710> * Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions <rust-lang/backtrace-rs#718>
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 2025-06-03 (rust-lang/rust@5d707b0) to 2025-06-17 (rust-lang/rust@45acf54) (inclusive) into main.
git merge
resulted 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: 3b96c9b