forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 54
Merge subtree update for toolchain nightly-2025-07-10 #413
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-07-10
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
…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
Introduce the `MetaSized` and `PointeeSized` traits as supertraits of `Sized` and initially implement it on everything that currently implements `Sized` to isolate any changes that simply adding the traits introduces.
more information to Display implementation for BorrowError/BorrowMutError - The BorrowError/BorrowMutError Debug implementations do not print anything differently from what the derived implementation does, so we don't need it. - This change also adds the location field of BorrowError/BorrowMutError to the the Display output when it is present, rewords the error message, and uses the Display trait for outputting the error message instead of Debug.
It's actually used as a counter so update the name to reflect that.
…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>
As core uses an extern type (`ptr::VTable`), the default `?Sized` to `MetaSized` migration isn't sufficient, and some code that previously accepted `VTable` needs relaxed to continue to accept extern types. Similarly, the compiler uses many extern types in `rustc_codegen_llvm` and in the `rustc_middle::ty::List` implementation (`OpaqueListContents`) some bounds must be relaxed to continue to accept these types. Unfortunately, due to the current inability to relax `Deref::Target`, some of the bounds in the standard library are forced to be stricter than they ideally would be.
Adding a sizedness supertrait shouldn't require multiple vtables so shouldn't be linted against.
Make performance description of String::{insert,insert_str,remove} more precise
std: refactor explanation of `NonNull` Fixes rust-lang#141933 I cut out the excessive explanation and used an example to explain how to maintain invariance, but I think what is quoted in the *rust reference* in the document needs to be added with a more layman's explanation and example. (I'm not sure if I deleted too much) r? `@workingjubilee`
Miscellaneous RefCell cleanups - Clarify `RefCell` error messages when borrow rules are broken - Remove `Debug` impl for `BorrowError`/`BorrowMutError` since `#derive(Debug)` provides identical functionality - Rename `BorrowFlag` to `BorrowCounter`
Sized Hierarchy: Part I This patch implements the non-const parts of rust-lang/rfcs#3729. It introduces two new traits to the standard library, `MetaSized` and `PointeeSized`. See the RFC for the rationale behind these traits and to discuss whether this change makes sense in the abstract. These traits are unstable (as is their constness), so users cannot refer to them without opting-in to `feature(sized_hierarchy)`. These traits are not behind `cfg`s as this would make implementation unfeasible, there would simply be too many `cfg`s required to add the necessary bounds everywhere. So, like `Sized`, these traits are automatically implemented by the compiler. RFC 3729 describes changes which are necessary to preserve backwards compatibility given the introduction of these traits, which are implemented and as follows: - `?Sized` is rewritten as `MetaSized` - `MetaSized` is added as a default supertrait for all traits w/out an explicit sizedness supertrait already. There are no edition migrations implemented in this, as these are primarily required for the constness parts of the RFC and prior to stabilisation of this (and so will come in follow-up PRs alongside the const parts). All diagnostic output should remain the same (showing `?Sized` even if the compiler sees `MetaSized`) unless the `sized_hierarchy` feature is enabled. Due to the use of unstable extern types in the standard library and rustc, some bounds in both projects have had to be relaxed already - this is unfortunate but unavoidable so that these extern types can continue to be used where they were before. Performing these relaxations in the standard library and rustc are desirable longer-term anyway, but some bounds are not as relaxed as they ideally would be due to the inability to relax `Deref::Target` (this will be investigated separately). It is hoped that this is implemented such that it could be merged and these traits could exist "under the hood" without that being observable to the user (other than in any performance impact this has on the compiler, etc). Some details might leak through due to the standard library relaxations, but this has not been observed in test output. **Notes:** - Any commits starting with "upstream:" can be ignored, as these correspond to other upstream PRs that this is based on which have yet to be merged. - This best reviewed commit-by-commit. I've attempted to make the implementation easy to follow and keep similar changes and test output updates together. - Each commit has a short description describing its purpose. - This patch is large but it's primarily in the test suite. - I've worked on the performance of this patch and a few optimisations are implemented so that the performance impact is neutral-to-minor. - `PointeeSized` is a different name from the RFC just to make it more obvious that it is different from `std::ptr::Pointee` but all the names are yet to be bikeshed anyway. - `@nikomatsakis` has confirmed [that this can proceed as an experiment from the t-lang side](https://rust-lang.zulipchat.com/#narrow/channel/435869-project-goals/topic/SVE.20and.20SME.20on.20AArch64.20.28goals.23270.29/near/506196491) - FCP in rust-lang#137944 (comment) Fixes rust-lang#79409. r? `@ghost` (I'll discuss this with relevant teams to find a reviewer)
This includes a fix for building on gnux32. [1]: https://github.com/rust-lang/libc/releases/tag/0.2.174
…kingjubilee Rollup of 13 pull requests Successful merges: - rust-lang#138538 (Make performance description of String::{insert,insert_str,remove} more precise) - rust-lang#141946 (std: refactor explanation of `NonNull`) - rust-lang#142216 (Miscellaneous RefCell cleanups) - rust-lang#142542 (Manually invalidate caches in SimplifyCfg.) - rust-lang#142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism) - rust-lang#142570 (Reject union default field values) - rust-lang#142584 (Handle same-crate macro for borrowck semicolon suggestion) - rust-lang#142585 (Update books) - rust-lang#142586 (Fold unnecessary `visit_struct_field_def` in AstValidator) - rust-lang#142587 (Make sure to propagate result from `visit_expr_fields`) - rust-lang#142595 (Revert overeager warning for misuse of `--print native-static-libs`) - rust-lang#142598 (Set elf e_flags on ppc64 targets according to abi) - rust-lang#142601 (Add a comment to `FORMAT_VERSION`.) r? `@ghost` `@rustbot` modify labels: rollup
Adds checking of PR descriptions to avoid relative issue links (without repository prefix) and mentions in commits.
Fixing the issue mentioned in issue rust-lang#1822 of rust-lang/stdarch.
…fixing a bug in the process.
The clock_nanosleep support is there to allow code using `sleep_until` to run under Miri. Therefore the implementation is minimal. - Only the clocks REALTIME and MONOTONIC are supported. The first is supported simply because it was trivial to add not because it was needed for sleep_until. - The only supported flag combinations are no flags or TIMER_ABSTIME only. If an unsupported flag combination or clock is passed in this throws unsupported.
…alfJung Specialize sleep_until implementation for unix (except mac) related tracking issue: rust-lang#113752 Supersedes rust-lang#118480 for the reasons see: rust-lang#113752 (comment) Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. rust-lang#93743 Suggested by @chrisduerr
…_sub, r=ibraheemdev Stabilize `mixed_integer_ops_unsigned_sub` Closes rust-lang#126043.
…aheemdev Link to 2024 edition page for `!` fallback changes Closes rust-lang#143207
Renamed retain_mut to retain on LinkedList as mentioned in the ACP This is for proposal: rust-lang/libs-team#250 The original check-in (rust-lang#114136) contained both methods **retain** and **retain_mut**, which does not conform to rust-lang/libs-team#250 (comment). I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request. The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements. I've run the tests "library/alloc" on the code and no issues. Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
…-zoom, r=jhpratt lib: more eagerly return `self.len()` from `ceil_char_boundary` There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. rust-lang#93743 Suggested by `@chrisduerr`
Rollup of 9 pull requests Successful merges: - rust-lang#143206 (Align attr fixes) - rust-lang#143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - rust-lang#143344 (Port `#[path]` to the new attribute parsing infrastructure ) - rust-lang#143359 (Link to 2024 edition page for `!` fallback changes) - rust-lang#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - rust-lang#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - rust-lang#143535 (Remove duplicate word) - rust-lang#143544 (compiler: rename BareFn to FnPtr) - rust-lang#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
doc(std): clarify `NonZero<T>` usage limitation in doc comment Closes rust-lang#142966 This PR clarifies `NonZero<T>` usage limitation in doc comment and fixes a typo. r? libs
std: fix typo in `std::path` I noticed that most of the document used `'` instead of `’`, so I adjusted it. r? `@ibraheemdev`
awhile -> a while where appropriate
Full list of `impl const Default` types: - () - bool - char - Cell - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
…Amanieu Implement `int_format_into` feature I took over rust-lang#138338 with `@madhav-madhusoodanan's` approval. Since rust-lang#136264, a lot of changes happened so I made use of them to reduce the number of changes. ACP approval: rust-lang/libs-team#546 (comment) ## Associated Issue - rust-lang#138215 r? `@hanna-kruppe`
…trieb Fix in std::String docs This PR removes the word “else” from the sentence ('something else similar') in the String documentation to improve clarity. Fixes rust-lang#143579.
…t, r=tgross35 Simplify num formatting helpers Noticed `ilog10` was being open-coded when looking at this diff: https://github.com/rust-lang/rust/pull/143423/files/85d6768f4c437a0f3799234df20535ff65ee17c2..76d9775912ef3a7ee145053a5119538bf229d6e5#diff-6be9b44b52d946ccac652ddb7c98146a01b22ea0fc5737bc10db245a24796a45 That, and two other small cleanups 😁 (should probably go through perf just to make sure it doesn't regress formatting)
Make `Default` const and add some `const Default` impls Full list of `impl const Default` types: - () - bool - char - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
clippy fix: indentation Fixes indentation of markdown comments.
tautschnig
approved these changes
Jul 11, 2025
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-07-02 (rust-lang/rust@71e4c00) to 2025-07-10 (rust-lang/rust@e43d139) (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: d836404