Rollup of 15 pull requests#157375
Closed
JonathanBrouwer wants to merge 41 commits into
Closed
Conversation
We already have a vector of `CoroutineSavedTy`, no need to have a separate one just for debuginfo.
Avoid complicated loops just for an optimization.
`coroutine.rs` was getting too large, and mixing MIR analyses for trait solving and runtime transformations.
This was necessary when transitioning from JS to wasm exception handling on Emscripten. Enough time has probably passed that we no longer need to support JS exception handling on Emscripten. This enables cleaning up a fair bit of code.
this removes the panic path when dividing by the frequency. this also makes calls to Instant::now() faster.
…=petrochenkov Promotes 5 Thumb-mode bare-metal Arm targets to Tier 2 This PR promotes five Thumb-mode bare-metal Arm targets to Tier 2, joining their Arm-mode counterparts which are already Tier 2: | Thumb-mode target (Tier 3 → Tier 2) | Arm-mode counterpart (already Tier 2) | |:---|:---| | `thumbv7a-none-eabi` | `armv7a-none-eabi` | | `thumbv7a-none-eabihf` | `armv7a-none-eabihf` | | `thumbv7r-none-eabi` | `armv7r-none-eabi` | | `thumbv7r-none-eabihf` | `armv7r-none-eabihf` | | `thumbv8r-none-eabihf` | `armv8r-none-eabihf` | Note: There is no `thumbv8r-none-eabi` target because the Cortex-R52 processor always includes an FPU, making a soft-float ABI variant unnecessary. These Thumb-mode targets generate T32 code by default while their Arm-mode counterparts generate A32 code. They share the same LLVM backend, ABI, and data layout — the only spec differences are the `llvm_target` string and the description. See rust-lang/compiler-team#985
…-incorrect-gen-args, r=petrochenkov delegation: emit error when there is an infer lifetime in user-specified args This PR checks emit error if there as an infer lifetime anywhere in delegation's user-specified args. And `delegation_user_specified_args` is now query as we invoke it two times. Fixes rust-lang#156848. Part of rust-lang#118212. r? @petrochenkov
…t-of-first-arg, r=petrochenkov
delegation: move statements out of the first arg
This PR moves statements that precede final block expression out of the first argument, so we can apply adjustments to final block expression in more cases.
This changes behavior a bit, for example if we specify an empty block:
```rust
fn b<C>(e: C) {}
reuse b {}
// Desugaring:
fn b<C>(arg0: _) -> _ { b::<C>(arg0) }
```
So we generated the first arg and block is no-op.
In general scenario:
```rust
trait Trait: Sized { //~ WARN trait `Trait` is never used
fn by_value(self, x: i32) -> i32 { x }
fn by_ref(&self, x: i32) -> i32 { x }
fn by_mut_ref(&mut self, x: i32) -> i32 { x }
}
struct F; //~ WARN struct `F` is never constructed
impl Trait for F {}
struct S(F); //~ WARN struct `S` is never constructed
impl Trait for S {
reuse <F as Trait>::* {
println!();
// Final expression is adjusted even if it is in a block.
self.0
}
}
// Desugaring:
#[attr = Inline(Hint)]
fn by_value(self: _, arg1: _)
->
_ {
// Final expression is adjusted even if it is in a block.
{ ::std::io::_print(format_arguments::from_str("\n")); };
<F as Trait>::by_value(self.0, arg1)
}
#[attr = Inline(Hint)]
fn by_ref(self: _, arg1: _)
->
_ {
{ ::std::io::_print(format_arguments::from_str("\n")); };
<F as Trait>::by_ref(self.0, arg1)
}
#[attr = Inline(Hint)]
fn by_mut_ref(self: _, arg1: _)
->
_ {
{ ::std::io::_print(format_arguments::from_str("\n")); };
<F as Trait>::by_mut_ref(self.0, arg1)
}
```
If we change target expression to
```rust
reuse <F as Trait>::* {
println!();
let x = 1;
}
// Desugaring:
#[attr = Inline(Hint)]
fn by_value(self: _, arg1: _)
->
_ {
{ ::std::io::_print(format_arguments::from_str("\n")); };
let x = 1;
<F as Trait>::by_value(self, arg1)
}
```
Once again we generated default arguments for function and block is no-op now (meaning it does not affect callee arguments).
Part of rust-lang#118212.
r? @petrochenkov
rustc_codegen_ssa: Refactor `ArchiveEntry` to include entry kind Needed for rust-lang#155338 in particular. r? @bjorn3
Rewrite target checking of `rustc_dummy` r? @mejrs
Contributor
Author
Contributor
Contributor
|
⌛ Trying commit a72cf41 with merge 92a1b0c… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/26883151934 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jun 3, 2026
Rollup of 15 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) |
Contributor
|
PR #157297, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
Contributor
Author
|
@bors try cancel |
Contributor
|
Try build cancelled. Cancelled workflows: |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
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:
ArchiveEntryto include entry kind #157263 (rustc_codegen_ssa: RefactorArchiveEntryto include entry kind)tests/ui/issues[3/N] #157236 (Reorganizetests/ui/issues[3/N])optimizeattribute #157297 (Add more tests for theoptimizeattribute)#[sanitize]#157332 (Rewrite target checking for#[sanitize])clippy::mem_replace_with_default#157336 (Enableclippy::mem_replace_with_default)rustc_dummy#157364 (Rewrite target checking ofrustc_dummy)Failed merges:
#[link]#157331 (Rewrite target checking for#[link])r? @ghost
Create a similar rollup