Commit Graph

325273 Commits

Author SHA1 Message Date
Rémy Rakic e4eb91ca0f catch callback unwinding to finalize in-flight self-profiling events from queries
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.
2026-04-30 15:14:55 +02:00
bors c935696dd0 Auto merge of #155487 - ShoyuVanilla:canon-ph, r=lcnr
Canonicalize free regions from inputs as placeholders in root univ



Context: The box named *coroutine witness Send lifetime requirements now considered by leakcheck* [this roadmap](https://raw.githubusercontent.com/hexcatnl/roadmap/e380fef94b47c02a056b4c8f05124a9db475b990/next-solver.svg)

Fixes (only for the next-solver) rust-lang/rust#106569 
Prerequisite of https://github.com/rust-lang/rust/pull/155749
2026-04-29 13:17:37 +00:00
bors 0424cc1673 Auto merge of #155775 - JonathanBrouwer:cleanup_stage, r=jdonszelmann,petrochenkov
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
2026-04-29 07:39:46 +00:00
Jonathan Brouwer 08babc8788 Add documentation of early parsing 2026-04-29 07:41:15 +02:00
Jonathan Brouwer dc9e4b0151 Remove Stage 2026-04-29 07:41:15 +02:00
Jonathan Brouwer 67cf0dee49 Remove most usages of Stage 2026-04-29 07:41:14 +02:00
Jonathan Brouwer e1332f4893 Remove should_emit from stage 2026-04-29 07:41:09 +02:00
Jonathan Brouwer 45e84bc68b Remove emit_err function from Stage 2026-04-29 07:41:06 +02:00
bors 4f9e4e1aa6 Auto merge of #155953 - ShoyuVanilla:rollup-BrmB2HL, r=ShoyuVanilla
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)
2026-04-29 04:15:02 +00:00
Shoyu Vanilla f2ae894662 Canonicalize free regions from inputs as placeholders in root univ 2026-04-29 13:13:04 +09:00
Shoyu Vanilla (Flint) 7ffff36037 Rollup merge of #155947 - SynapLink:cleanup/check-pass-variance-tests, r=nnethercote
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.
2026-04-29 10:40:49 +09:00
Shoyu Vanilla (Flint) 44753d47a5 Rollup merge of #155943 - romancitodev:fix/version-mismatch, r=nia-e
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.
2026-04-29 10:40:48 +09:00
Shoyu Vanilla (Flint) 037b1e1746 Rollup merge of #155922 - cyrgani:no-dead-aux-files, r=jieyouxu
delete unused auxiliary test files

Related issue for detecting these properly: https://github.com/rust-lang/rust/issues/133914.
2026-04-29 10:40:48 +09:00
Shoyu Vanilla (Flint) 4d802c9f0e Rollup merge of #155896 - nnethercote:shrink-ParseSess, r=JonathanBrouwer
Shrink `ParseSess`

`ParseSess` contains some unnecessary fields. Details in individual commits.

r? @JonathanBrouwer
2026-04-29 10:40:47 +09:00
Shoyu Vanilla (Flint) dce5b97c52 Rollup merge of #155648 - ShoyuVanilla:maybe-stalled-on-couroutines, r=lcnr
`-Znext-solver` Propagate `stalled_on_coroutines` as a field in `Certainty::Maybe`

..instead of collecting them with a `ProofTreeVisitor`

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/270
2026-04-29 10:40:46 +09:00
Shoyu Vanilla (Flint) 5d26634476 Rollup merge of #152443 - kjetilkjeka:nvptx_drop_support_old_hw_and_isa, r=ZuseZ4
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.
2026-04-29 10:40:46 +09:00
Nicholas Nethercote 01e933f888 Move four fields from ParseSess to Session.
`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`.
2026-04-29 09:27:04 +10:00
Nicholas Nethercote b317977ee3 Remove ParseSess::assume_incomplete_release.
- 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`.
2026-04-29 09:26:42 +10:00
SynapLink b19b0e5629 tests: mark simple UI tests as check-pass 2026-04-28 23:10:46 +02:00
romandev 910e2d2cd0 fix: adding missing corrections 2026-04-28 16:59:56 -03:00
romandev a449ea5ee6 fix: ✏️ forgot to change the stable version for assert_matches! macro. 2026-04-28 16:32:55 -03:00
bors 37d85e592f Auto merge of #155941 - JonathanBrouwer:rollup-Ak66iXR, r=JonathanBrouwer
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#155923 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#155930 (Sync from portable simd 2026 04 28)
 - rust-lang/rust#155850 (Only exclude the rust-lang/rust#155473 change for 1-byte bool-likes)
 - rust-lang/rust#151994 (switch to v0 mangling by default on stable)
 - rust-lang/rust#154325 (Tweak irrefutable let else warning output)
 - rust-lang/rust#155273 (Lock stable_crate_ids once in create_crate_num)
 - rust-lang/rust#155361 (Document that CFI diverges from Rust wrt. ABI-compatibility rules)
 - rust-lang/rust#155692 (disable naked-dead-code-elimination test if no RET mnemonic is available)
 - rust-lang/rust#155747 (Update documentation for `wasm32-wali-linux-musl` after integrating n…)
 - rust-lang/rust#155768 (compiletest: Overhaul the code for running an incremental test revision)
 - rust-lang/rust#155907 (Handle hkl const closures)
 - rust-lang/rust#155910 (misc stuff from reading borrowck again :))
 - rust-lang/rust#155913 (Delete the 12 year old fixme)
 - rust-lang/rust#155920 (remove review queue triagebot mentions)
 - rust-lang/rust#155936 (Rename `SharedContext::emit_dyn_lint*` into `emit_lint*`)
2026-04-28 19:00:23 +00:00
Jonathan Brouwer 4dd31caab6 Rollup merge of #155936 - GuillaumeGomez:small-cleanup, r=JonathanBrouwer,Urgau
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
2026-04-28 20:24:39 +02:00
Jonathan Brouwer 6b48f6f201 Rollup merge of #155920 - davidtwco:triagebot-remove-review-queue, r=jieyouxu
remove review queue triagebot mentions

t-compiler's review queue isn't in the `triagebot.toml` anymore so these pings don't make sense.
2026-04-28 20:24:38 +02:00
Jonathan Brouwer 766d9caf51 Rollup merge of #155913 - mejrs:delete_the_fixme, r=nia-e
Delete the 12 year old fixme

I think Option is documented well enough at this point.
2026-04-28 20:24:37 +02:00
Jonathan Brouwer bbfdaa9764 Rollup merge of #155910 - BoxyUwU:borrowck_cleanup_5, r=lcnr
misc stuff from reading borrowck again :)

r? lcnr
2026-04-28 20:24:36 +02:00
Jonathan Brouwer f7f266b2b1 Rollup merge of #155907 - oli-obk:push-nypowoyskzxp, r=Kivooeo
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.
2026-04-28 20:24:36 +02:00
Jonathan Brouwer ebbddb36f2 Rollup merge of #155768 - Zalathar:incremental, r=jieyouxu
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
2026-04-28 20:24:35 +02:00
Jonathan Brouwer 57f2b15a53 Rollup merge of #155747 - arjunr2:main, r=davidtwco
Update documentation for `wasm32-wali-linux-musl` after integrating n…

Additional documentation updates, along with rust-lang/rust#155654
2026-04-28 20:24:34 +02:00
Jonathan Brouwer c6912bf401 Rollup merge of #155692 - fneddy:fix_naked-dead-code-elimination, r=folkertdev
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.
2026-04-28 20:24:33 +02:00
Jonathan Brouwer 8f15da4d30 Rollup merge of #155361 - Darksonn:abi-cfi, r=RalfJung
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" />
2026-04-28 20:24:32 +02:00
Jonathan Brouwer 22967dff41 Rollup merge of #155273 - zetanumbers:create_crate_num_lock, r=jdonszelmann
Lock stable_crate_ids once in create_crate_num

This is a small refactor PR removing redundant locks of `stable_crate_ids` from  `create_crate_num`.
2026-04-28 20:24:32 +02:00
Jonathan Brouwer 8ee783610d Rollup merge of #154325 - WeiTheShinobi:tweak-let-else-output, r=davidtwco
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 {
   |
```
2026-04-28 20:24:30 +02:00
Jonathan Brouwer 1857d2ee9f Rollup merge of #151994 - davidtwco:v0-mangling-on-stable, r=wesleywiser
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
2026-04-28 20:24:29 +02:00
Jonathan Brouwer 7f76b8bbb6 Rollup merge of #155850 - scottmcm:tweak_niche_assignment, r=mati865
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
2026-04-28 20:24:29 +02:00
Jonathan Brouwer eac6db9677 Rollup merge of #155930 - folkertdev:sync-from-portable-simd-2026-04-28, r=folkertdev
Sync from portable simd 2026 04 28

r? calebzulawski (I'll self-approve if CI looks good)
2026-04-28 20:24:28 +02:00
Jonathan Brouwer 1321a67385 Rollup merge of #155923 - bjorn3:sync_cg_clif-2026-04-28, r=bjorn3
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
2026-04-28 20:24:27 +02:00
Shoyu Vanilla 25c241c1b0 Propagate stalled_on_coroutines as a field in Certainty::Maybe 2026-04-29 02:28:38 +09:00
Folkert de Vries 631e935763 Merge commit 'cc032ad5ed5b69d606c4eabbc9c9ae1f412ef2fb' into sync-from-portable-simd-2026-04-28 2026-04-28 17:17:28 +02:00
Alice Ryhl aef93ca43a Document that CFI diverges from Rust wrt. ABI-compatibility rules 2026-04-28 15:16:49 +00:00
Caleb Zulawski cc032ad5ed Merge pull request #525 from folkertdev/sync-from-rust-2026-04-28
Sync from rust 2026 04 28
2026-04-28 11:08:12 -04:00
Folkert de Vries b104260475 bump toolchain to nightly-2026-04-28 2026-04-28 16:50:33 +02:00
Folkert de Vries 82ee1e04c6 use larger ulps for log because it uses 2 inexact operations 2026-04-28 16:49:48 +02:00
Folkert de Vries 98f08d2a7a Merge branch 'rust-upstream-2026-04-28' into sync-from-rust-2026-04-28 2026-04-28 16:44:18 +02:00
Guillaume Gomez 81d67b7d03 Rename SharedContext::emit_dyn_lint* into emit_lint* 2026-04-28 16:35:01 +02:00
bjorn3 45593d8abc Merge commit '3b6080cb20924f0c4f94e47bbbbfcae8b07d82e5' into sync_cg_clif-2026-04-28 2026-04-28 14:59:46 +02:00
cyrgani 5f066e9467 delete unused auxillary test files 2026-04-28 12:22:02 +00:00
David Wood 62ee4cdaa4 remove review queue triagebot mentions 2026-04-28 13:21:22 +01:00
bors 03c609abb6 Auto merge of #155911 - jhpratt:rollup-DOR0YN1, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#155381 (Fix a bug in `ChunkedBitSet::subtract`)
 - rust-lang/rust#155847 (Don't reload length in String::push)
 - rust-lang/rust#155858 (`slice::join`: borrow only once during length calc)
 - rust-lang/rust#155879 (enable pipe tests in Miri)
 - rust-lang/rust#155905 (Update LLVM to 22.1.4 (again))
 - rust-lang/rust#155247 ([AIX] update linker default to bcdtors)
 - rust-lang/rust#155812 ([codex] tests: mark migrated UI tests as check-pass)
 - rust-lang/rust#155854 (Rename the diagnostic item for `std::sync::mpsc::Receiver`)
 - rust-lang/rust#155882 (Add regression test for rust-lang/rust#101363)
2026-04-28 10:50:47 +00:00
mejrs 0eda44baac Delete the 12 year old fixme 2026-04-28 12:00:48 +02:00