Rollup of 9 pull requests#155845
Closed
JonathanBrouwer wants to merge 28 commits intorust-lang:mainfrom
Closed
Conversation
Targets that set `requires_lto = true` were not actually using lto when compiling with cargo by default. They needed an extra `lto = true` in `Cargo.toml` to work. Fix this by letting lto take precedence over the `embed_bitcode` flag when lto is required by a target. If both these flags would be supplied by the user, an error is generated. However, this did not happen when lto was requested by the target instead of the user.
Commit cb37ee2 ("make field representing types invariant over the base type") made the auto-trait impl work even if `T: !Send` or `T: !Sync` thus we can remove these explicit unsafe impls while FRTs still implement `Send` and `Sync`.
Using the reflection experiment, we can print the actual names of the field that an FRT is referring to. In case this breaks, there is an alternative implementation in the note comment.
Eliminate `cursor` and `ibuf` as named variables, as their presence makes things more confusing.
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Fix requires_lto targets needing lto set in cargo Targets that set `requires_lto = true` were not actually using lto when compiling with cargo by default. They needed an extra `lto = true` in `Cargo.toml` to work. Fix this by letting lto take precedence over the `embed_bitcode` flag when lto is required by a target. If both these flags would be supplied by the user, an error is generated. However, this did not happen when lto was requested by the target instead of the user. Fixes rust-lang#148514 Tracking issue: rust-lang#135024
…_hw_and_isa, r=ZuseZ4 NVPTX: Drop support for old architectures and old ISAs This is the implementation of [this MCP](rust-lang/compiler-team#965 (comment)) I believe it was said that no FCP was needed, but if that is incorrect then the FCP is anyway scheduled to finish in 2 days so it can in any case be merged then.
…lacrum `std::io::Take`: Clarify & optimize `BorrowedBuf::set_init` usage. Don't initialize `buf` if it was already initialized. Clarify safety comments. Move the `buf.advance()` call to make the initialization more like calling `buf.ensure_init()`, then clarify how the code here is an optimized variant of `ensure_init`.
…ulacrum Implement more traits for FRTs From rust-lang#154927 (comment). FRTs now implement the following traits: `Sized + Freeze + RefUnwindSafe + Send + Sync + Unpin + UnsafeUnpin + UnwindSafe + Copy + Debug + Default + Eq + Hash + Ord`. Let me know if there is any trait missing. I also removed the explicit `Send` and `Sync` impls, since commit cb37ee2 ("make field representing types invariant over the base type") made the auto-trait impl work even if `T: !Send` or `T: !Sync`. Very happy to see unsafe impls get dropped :) Note that I used the reflection feature (cc @oli-obk) to print the actual field names in the debug implementation. I think this is a cool way to use it, but if it isn't ready for that, I'm happy to change it to the alternative implementation I gave in the note comment (it's essentially Mark's suggestion but printing `T`'s name instead of `Self`'s). Since this is a library change, I'll give this to Mark; feel free to also take a look/leave comments, Oli :) r? @Mark-Simulacrum
Add boxing suggestions for `impl Trait` return type mismatches A sort of a follow up pr to this -> rust-lang#155546
…re-return-note, r=wesleywiser Avoid misleading closure return type note Fixes rust-lang#155670
…=mejrs Convert attribute `FinalizeFn` to fn pointer
rustc_attr_parsing: use a `try {}` in `or_malformed`
… r=wesleywiser couple of `crate_name` cleanups Split out from rust-lang#153924; these changes should be uncontroversial.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 26, 2026
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-2
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 26, 2026
…uwer Rollup of 9 pull requests Successful merges: - #149624 (Fix requires_lto targets needing lto set in cargo) - #152443 (NVPTX: Drop support for old architectures and old ISAs) - #155317 (`std::io::Take`: Clarify & optimize `BorrowedBuf::set_init` usage.) - #155588 (Implement more traits for FRTs) - #155682 (Add boxing suggestions for `impl Trait` return type mismatches) - #155770 (Avoid misleading closure return type note) - #155818 (Convert attribute `FinalizeFn` to fn pointer) - #155829 (rustc_attr_parsing: use a `try {}` in `or_malformed`) - #155835 (couple of `crate_name` cleanups)
Contributor
|
💔 Test for 8f076ed failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 81c946b failed: CI. Failed job:
|
Contributor
|
PR #152443, which is a member of this rollup, was unapproved. |
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:
std::io::Take: Clarify & optimizeBorrowedBuf::set_initusage. #155317 (std::io::Take: Clarify & optimizeBorrowedBuf::set_initusage.)impl Traitreturn type mismatches #155682 (Add boxing suggestions forimpl Traitreturn type mismatches)FinalizeFnto fn pointer #155818 (Convert attributeFinalizeFnto fn pointer)try {}inor_malformed#155829 (rustc_attr_parsing: use atry {}inor_malformed)crate_namecleanups #155835 (couple ofcrate_namecleanups)r? @ghost
Create a similar rollup