fatal errors currently abort the compiler process without allocating the self-profile
strings: query events aren't always correctly recorded, and will show up as <unknown>
in the data.
catching the unwinding panic allows us to finalize the self-profiling process correctly
before continuing unwinding as before.
Remove attribute parsing `Stage`
I discovered that it is surprisingly easy to remove the concept of `Stage` in the attribute parsers, imo this makes the code a lot cleaner.
r? @jdonszelmann
cc @mejrs @Bryntet
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#152443 (NVPTX: Drop support for old architectures and old ISAs)
- rust-lang/rust#155648 (`-Znext-solver` Propagate `stalled_on_coroutines` as a field in `Certainty::Maybe`)
- rust-lang/rust#155896 (Shrink `ParseSess`)
- rust-lang/rust#155922 (delete unused auxiliary test files)
- rust-lang/rust#155943 (fix: ✏️ forgot to change the stable version for `assert_matches!` macro.)
- rust-lang/rust#155947 (tests: mark simple UI tests as check-pass)
tests: mark simple UI tests as check-pass
This changes 14 simple UI tests from build-pass to check-pass.
These tests cover type checking, trait bounds, closure inference, deprecation diagnostics, dyn compatibility, and variance. They do not need codegen or linking, so check-pass keeps the intended coverage while removing old FIXME(62277) markers.
fix: ✏️ forgot to change the stable version for `assert_matches!` macro.
The `assert_matches` macro was delayed because of rust-lang/rust#154406 and the `#[stable(since)]` wasn't changed to the next version.
NVPTX: Drop support for old architectures and old ISAs
This is the implementation of [this MCP](https://github.com/rust-lang/compiler-team/issues/965#issuecomment-3837320262)
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.
`ParseSess` is separate from, but sits within, `Session`. The separation
is because there are some places (e.g. `Parser` methods) where
`ParseSess` is available but `Session` is not.
However, `ParseSess` has four fields that are only accessed from places
where `Session` is also available. This commit moves those fields to
`Session`. This means that `ParseSess` only contains the fields it
genuinely needs, and various `sess.psess.foo` occurrences are reduced to
`sess.foo`.
- This field is just a copy of `sess.unstable_opts.assume_incomplete_release`.
- This field has a single use.
- `sess` is also available at that use point
So this commit removes the field and gets the value directly from
`sess`.
Rename `SharedContext::emit_dyn_lint*` into `emit_lint*`
Part of https://github.com/rust-lang/rust/issues/153099.
Very small cleanup while I figure out how to have a `Diagnostic` argument instead of the current closures.
r? @JonathanBrouwer
Handle hkl const closures
I severely overthought this in rust-lang/rust#153818😆
The const closure trait solver impl is now in sync with the non-const closure trait solver impl.
compiletest: Overhaul the code for running an incremental test revision
The main goals of this overhaul are:
- Introduce a dedicated `IncrRevKind` enum for exhaustive matching.
- Eliminate any dependency on `PassMode` and `FailMode`.
- Use a single code path for all incremental revision kinds.
Separating incremental tests from the existing pass/fail enums should make it easier to overhaul the implementation of pass/fail expectations in UI tests.
---
Later on we might want to reintroduce more shared code paths for the different test modes, but for now the extra isolation makes it easier to clean up the individual modes.
r? jieyouxu
disable naked-dead-code-elimination test if no RET mnemonic is available
this test emit x86_64 specific ret asm instruction and should not be compiled on any other arch.
Document that CFI diverges from Rust wrt. ABI-compatibility rules
The CFI sanitizer is a sanitizer that checks that no ABI-incompatible function calls are made at runtime, but there is currently an unfortunate divergence between the Rust ABI-compatibility rules and what the CFI sanitizer checks. Thus, document that this divergence exists.
There are proposals for how we can align the ABI rules to eliminate this discrepancy, and I would like to follow through with those, but for now I think we can at least document that the discrepancy exists.
For further discussion please see [Re-evaluate ABI compatibility rules in light of CFI](https://github.com/rust-lang/unsafe-code-guidelines/issues/489) and [Can CFI be made compatible with type erasure schemes?](https://github.com/rust-lang/rust/issues/128728) and [`fn_cast!` macro](https://github.com/rust-lang/rust/issues/140803).
cc @rcvalle @samitolvanen @maurer @bjorn3 @RalfJung
Rendered:
<img width="956" height="391" alt="image" src="https://github.com/user-attachments/assets/410d3eaa-9476-4800-9ef8-bbb100a100c5" />
Tweak irrefutable let else warning output
Fixes https://github.com/rust-lang/rust/issues/153454
Greeting!
This PR tweak diagnostic output for `irrefutable-let-else` patterns and adds a check for `let a = Some(b) else {...}`
Thanks for the review!
```
help: consider using `let Some(name) = case` to match on a specific variant
|
LL - let name = Some(case) else {
LL + let Some(name) = case else {
|
```
switch to v0 mangling by default on stable
Following rust-lang/rust#89117, rustc has defaulted to the v0 mangling scheme by default (since Nov 20th 2025). This surfaced two bugs:
- rust-lang/rust#138261 was a small ICE (found via fuzzing) where an implementation-internal namespace was missing for global assembly - this occurs with names instantiated within global assembly (that can happen inside constants)
- rust-lang/rust#134479 only occurs with unstable `generic_const_exprs`
Since there have been three-to-four months for users to find bugs with this mangling scheme on nightly, that the scheme has been waiting many years to be stabilised, and has been used successfully internally at Microsoft, Meta and Google for many years, this patch proposes stabilising the v0 mangling scheme on stable.
This patch does not propose removing the legacy mangling, it will remain usable on nightly as an escape-hatch if there are remaining bugs (though admittedly it would require switching to nightly for those on stable) - it is anticipated that this would be unlikely given current testing undergone by v0. Legacy mangling can be removed in another follow-up.
r? @wesleywiser
Only exclude the #155473 change for 1-byte bool-likes
That's the thing we handle differently in codegen (see `to_immediate_scalar`) so if the other ones are fine, that helps narrow it down further.
cc https://github.com/rust-lang/rust/pull/155473
Subtree sync for rustc_codegen_cranelift
The main highlights this time are a Cranelift update and fixing backtraces for arm64 macOS (x86_64 macOS is still broken).
r? @ghost
@rustbot label +A-codegen +A-cranelift +T-compiler +subtree-sync