Skip to content

[pull] master from rust-lang:master#61

Merged
pull[bot] merged 34 commits intoEricLBuehler:masterfrom
rust-lang:master
Jul 31, 2025
Merged

[pull] master from rust-lang:master#61
pull[bot] merged 34 commits intoEricLBuehler:masterfrom
rust-lang:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jul 31, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

beepster4096 and others added 30 commits July 25, 2025 13:19
This allows us to assume that coverage spans will only be discarded during
codegen in very unusual situations.
It's not used in `rustc_middle`, and `rustc_resolve` is a better place
for it.
It's not used in `rustc_middle`, and `rustc_trait_selection` is a better
place for it.
Next to all the other `EarlyParamRegion` pieces.
It's only used in `rustc_hir_typeck`.
It's only used in `rustc_infer`.
The fields are public, so this doesn't need a method, normal
deconstruction and/or field access is good enough.
It's identical to `TyCtxt::get_all_attrs` except it takes `DefId`
instead of `impl Into<DefIf>`.
It's only used in `rustc_hir_typeck`.
- Put them in the module that defines the type.
- Add some `WithCachedTypeInfo<T>` asserts for consistency.
Implement `push_mut`

Implementation of #135974.
Fix Box allocator drop elaboration

New version of #131146.

Clearing Box's drop flag after running its destructor can cause it to skip dropping its allocator, so just don't. Its cleared by the drop ladder code afterwards already.

Unlike the last PR this also handles other types with destructors properly, in the event that we can have open drops on them in the future (by partial initialization or DerefMove or something).

Finally, I also added tests for the interaction with async drop here but I discovered #143658, so one of the tests has a `knownbug` annotation. Not sure if it should be in this PR at all though.

Fixes #131082

r? wesleywiser - prev. reviewer
Implement support for `become` and explicit tail call codegen for the LLVM backend

This PR implements codegen of explicit tail calls via `become` in `rustc_codegen_ssa` and support within the LLVM backend. Completes a task on (#112788). This PR implements all the necessary bits to make explicit tail calls usable, other backends have received stubs for now and will ICE if you use `become` on them. I suspect there is some bikeshedding to be done on how we should go about implementing this for other backends, but it should be relatively straightforward for GCC after this is merged.

During development I also put together a POC bytecode VM based on tail call dispatch to test these changes out and analyze the codegen to make sure it generates expected assembly. That is available [here](https://github.com/xacrimon/tcvm).
coverage: Re-land "Enlarge empty spans during MIR instrumentation"

This allows us to assume that coverage spans will only be discarded during codegen in very unusual situations.

---

This seemingly-simple change has a rather messy history:
- #140847
- #141650
- #144298
- #144480

Since then, a number of related changes have landed that should make it reasonable to try again:
- #144530
- #144560
- #144616

In particular, we have multiple fixes/mitigations, and a confirmed regression test for the original bug that is not triggered by re-landing the changes in this PR.
Only extract lang items once in codegen_fn_attrs

This one should be obvious. These two extraction points used to be far apart but now that they're refactored to be close it was rather obvious we're just doing double work....

r? ``@WaffleLapkin``

Buils on #144655
…r=compiler-errors

Move `rustc_middle::parameterized`

It doesn't need to be in `rustc_middle`.

r? `@compiler-errors`
Rollup of 6 pull requests

Successful merges:

 - #135975 (Implement `push_mut`)
 - #143672 (Fix Box allocator drop elaboration)
 - #144232 (Implement support for `become` and explicit tail call codegen for the LLVM backend)
 - #144663 (coverage: Re-land "Enlarge empty spans during MIR instrumentation")
 - #144685 (Only extract lang items once in codegen_fn_attrs)
 - #144717 (Move `rustc_middle::parameterized`)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar and others added 4 commits July 31, 2025 18:52
fix: Only "close the window" when its the last annotated file

While comparing the Unicode theme output of `rustc` and `annotate-snippets`, I found that `rustc` would ["close the window"](https://github.com/rust-lang/rust/blob/686bc1c5f9c06762b18082434c04d514acf6707e/compiler/rustc_errors/src/emitter.rs#L1025-L1027) (draw a `╰╴`), even though there were other annotated files that followed the current one. This PR makes it so the emitter will only "close the window" on the last annotated file.

Before:
```
error[E0624]: method `method` is private
   ╭▸ $DIR/close_window.rs:9:7
   │
LL │     s.method();
   ╰╴      ━━━━━━ private method
   │
   ⸬ $DIR/auxiliary/close_window.rs:3:5
   │
LL │     fn method(&self) {}
   ╰╴    ──────────────── private method defined here
```

After:
```
error[E0624]: method `method` is private
   ╭▸ $DIR/close_window.rs:9:7
   │
LL │     s.method();
   │       ━━━━━━ private method
   │
   ⸬ $DIR/auxiliary/close_window.rs:3:5
   │
LL │     fn method(&self) {}
   ╰╴    ──────────────── private method defined here
```
`rustc_middle::ty` cleanups

r? `@davidtwco`
Rollup of 3 pull requests

Successful merges:

 - #144657 (fix: Only "close the window" when its the last annotated file)
 - #144665 (Re-block SRoA on SIMD types)
 - #144713 (`rustc_middle::ty` cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
@pull pull bot locked and limited conversation to collaborators Jul 31, 2025
@pull pull bot added the ⤵️ pull label Jul 31, 2025
@pull pull bot merged commit 64ca23b into EricLBuehler:master Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants