Rollup of 14 pull requests - #161884
Closed
GuillaumeGomez wants to merge 33 commits into
Closed
Conversation
... and related machienery
Remove trivial bounds Panic on NaN Make assert messages consistent with field names Add clamp_to coretests Update to fmt style Use target_has_reliable_fN_math Change existing clamp tests to use reliable_math Use reliable_math on doctests too Add #[expect] for NaN check
This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module.
…lt implementations
…v6 multicast_loop methods
…, where the name is ambiguous, make to always report the `ambiguous_glob_imported_traits` lint independent of the ordering of exports. Added a test to make sure both ordering trigger the lint.
This commit adds the `crt1-reactor.o` object file in the list of
pre-link-crt-objects for the `{Dynamic,Static}Dylib` output kinds for
WASI targets. These previously were omitted I believe by accident and
this means that the conventional `_initialize` function is not present
which runs constructor functions, for example. This is additionally
needed for the upcoming wasip3 target where this startup object file is
more load bearing than it was previously and will become required.
…-generate-macro-expansion`
* Implement Reborrow as a recursive operation If Reborrow finds '&'a mut T' fields then it inserts a Deref and borrow of the T, and likewise if it finds a 'T: Reborrow' field then the field type is recursed into. This makes Reborrow always produce the correct borrow checking logic at the cost of most probably being inconsiderately expensive. The thinking is that performance will be a followup consideration. * PhantomDeref * Simpler deref test * Add more PhantomDeref unreachability assertions * Write out lifetime omission * Document ProjectionElem::PhantomDeref * Comment half of reborrow tests * fix PhantomDeref conflicting with AccessDepth::Shallow * Recheck CoerceShared in borrowck TypeChecker to ensure its lifetimes make sense * Fix rebase * Changes... but where to? * Typo fix * Improve comment * Use fully_perform_op to evaluate CoerceShared trait in borrowck * More CoerceShared comment * Comment rest of Reborrow tests Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
Implement clamp_to Implements the revised version of rust-lang#147781. Supersedes rust-lang#147786. Currently I restrict the ClampBounds trait using a second, perma-unstable feature. I don't know if that's the usual way to deal with this kind of traits, I'd be happy to change it if not. ~~I currently define NaN as equal to no bound. This is consistent with `max` and `min`, but is inconsistent with `clamp`, which panics.~~ Changed so that the float versions panic if any bound is NaN, just like `clamp` does.
…ce, r=oli-obk fix(reborrow): recursive implementation If Reborrow finds '&'a mut T' fields where 'a is the Reborrowed type's first lifetime parameter (currently the only lifetime that is allowed to reborrow) then it inserts a Deref and borrow of the T, and likewise if it finds a 'T: Reborrow' field then the field type is recursed into. This makes Reborrow always produce the correct borrow checking logic at the cost of most probably being inconsiderately expensive. The thinking is that performance will be a followup consideration. r? @oli-obk
std: avoid aliasing violations when wrapping opaque C types Fixes rust-lang#160815 (and some other instances of the same problem) See the new documentation of `COpaque` for a detailed description of the kinds of issues solved by this. In short: creating mutable references to the opaque types from pthread is unsound since some platforms (at least AIX) store an intrinsically list of these types and the creation of the mutable reference (e.g. in the drop glue) invalidates the other pointers to the type. This doesn't just apply to the internal pthread `Condvar` and `Mutex` abstraction as described in the issue, but also to all other opaque types – nobody is promising us that these are not internally aliased. Hence this PR adds an internal `COpaque` helper type which uses a combination of `UnsafePinned` and `MaybeUninit` to relax all relevant requirements added by Rust's operational semantics. CC @RalfJung I'd love to hear your opinion on this r? libs
…, r=bjorn3
Include startup crt objects on WASI for more outputs
This commit adds the `crt1-reactor.o` object file in the list of pre-link-crt-objects for the `{Dynamic,Static}Dylib` output kinds for WASI targets. These previously were omitted I believe by accident and this means that the conventional `_initialize` function is not present which runs constructor functions, for example. This is additionally needed for the upcoming wasip3 target where this startup object file is more load bearing than it was previously and will become required.
…ort-trait-lint, r=petrochenkov Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order Fixes rust-lang#160742 When inserting candidates for a method pick we deduplicate candidates based on the trait id, this "deleted" traits that where (not) ambiguous: ```rust // depending on the order, the second one is removed mod prelude { pub use crate::expression::IntoSql; pub use crate::expression::IntoSql as _; } use module::*; // imports some item names IntoSql use prelude::*; // imports trait `IntoSql` and `IntoSql as _` ``` This caused the lint `ambiguous_glob_imported_traits` to not be triggered if the `as _` came first, even though both are actually in scope. We now deduplicate based on `(def_id, lint_ambiguous)` and later check that if an ambiguous candidate is present in `collapse_candidates_to_trait_pick`, we mark the pick as `lint_ambiguous`. (its also easy to reverse the behaviour of this change). Also added a test with 2 revisions placing the `as _` export first or last. It's the most "clean" way I could come up, hopefully someone more versed in this part of the compiler could tell me how it is done in a better way :). cc @petrochenkov, since I feel like you know if the lint should be triggered or not in this case. LLM disclosure: I used a LLM to create a shorter PR title, because i couldn't come up with a short one.
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
…ault-functions, r=petrochenkov delegation: add tests fixating behavior of delegating to default trait implementations This PR adds tests for delegation to trait functions that have default implementation, thus fixating current behavior. Part of rust-lang#118212. r? @petrochenkov
…ochenkov reduce perf impact of scalar size checks Attempting to undo the perf regression in rust-lang#161238.
Print vendor instructions in `x vendor` When the user manually runs `x vendor`, we should tell them what to put into their `.cargo/config.toml` file. This regressed some time ago when the Vendor step was refactored in bootstrap, I think. Before this PR, the part after "this project" was blank: ``` To use vendored sources, add this to your .cargo/config.toml for this project: [source.crates-io] replace-with = "vendored-sources" [source."git+https://github.com/rust-lang/team"] git = "https://github.com/rust-lang/team" replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" ``` r? bjorn3
…-type-mismatch-attribution, r=folkertdev Improve type mismatch annotation for lets with block-wrapped initializers Fixes rust-lang#127048
…=JonathanBrouwer Never type after-stabilization cleanup r? @JonathanBrouwer
Member
Author
|
@bors r+ p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
Rollup of 14 pull requests Successful merges: - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #161456 (reduce perf impact of scalar size checks) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 67c9671 failed: CI. Failed job:
|
Member
|
I can't tell at a glance whether this failure is real or fake. @bors try jobs= dist-apple-various |
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
@bors try jobs=dist-apple-various |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
Rollup of 14 pull requests try-job: dist-apple-various
Member
|
It's an IO error so most likely fake |
Member
I agree; I just don’t want to fall into the trap of assuming it’s fake and then seeing the next several rollups fail to a real problem. 👍 |
Contributor
Member
|
As expected, the failure was indeed fake. |
Member
|
Contributor
|
This pull request was unapproved due to being closed. |
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.
Successful merges:
ambiguous_glob_imported_traitsdoesn't depend on import order #161805 (Prefer ambiguous candidates when deduplicating traits in scope, soambiguous_glob_imported_traitsdoesn't depend on import order)x vendor#161666 (Print vendor instructions inx vendor)--generate-macro-expansion#161876 (rustdoc: Correctly handle when a macro generates multiple items in--generate-macro-expansion)r? @ghost
Create a similar rollup