Skip to content

Rollup of 5 pull requests#156893

Merged
rust-bors[bot] merged 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-KrnXZ2W
May 24, 2026
Merged

Rollup of 5 pull requests#156893
rust-bors[bot] merged 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-KrnXZ2W

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Zalathar and others added 13 commits May 18, 2026 16:30
This intermediate commit makes subsequent diffs/blame a bit nicer, by
encouraging git's blame view to preserve line history for the remaining parts
of `handle_needs`, which would otherwise be obscured.

A subsequent commit will move the list back into `needs.rs` in an altered form.
This commit fixes a broken suggestion that occurs when a struct pattern contains an unused
variable written with a raw identifier.
Fixes rust-lang#10671

The `-Zunpretty=identified` option (without `expanded`) is effectively
useless because `NodeId`s are unassigned prior to macro expansion,
leading them to just be `NodeId::MAX_AS_U32`.

This commit removes the `Identified` variant from `PpSourceMode` and
removes `-Zunpretty=identified` from the command-line options. Users
should use `-Zunpretty=expanded,identified` instead (which is retained)
if they want to inspect `NodeId`s.
Do not suggest compatible variants inside macro

Fixes rust-lang#142359

r? compiler
compiletest: Prepare all simple `//@ needs-*` conditions in advance

This PR makes compiletest check almost all `//@ needs-*` conditions in advance, separate from individual tests or directives. The results of these checks are stored in a prepared hashmap that can then be inspected by individual tests when encountering a needs-* directive.

This is *similar* to how `ignore-*`/`only-*` directives work (as of rust-lang#149470), though currently the two mechanisms don't share code, as they have subtly different requirements.

r? jieyouxu
…ables-struct-pattern, r=JonathanBrouwer

Fix suggestion of unused variables with raw identifier in struct pattern

This MR fixes a broken lint suggestion that occurs when a struct pattern contains an unused variable written with a raw identifier.

In the following fragment, `r#move` is an unused variable. The compiler suggested to change it to `move: _` which doesn’t compile since move is a keyword. This change makes it so that the suggestion becomes `r#move: _`

```rust
struct Foo {
    r#move: u32
}

fn bar(foo: Foo) -> u32 {
    match foo {
         Foo { r#move } => 0
    }
}
```

r? JonathanBrouwer
…ied, r=bjorn3

Remove useless -Zunpretty=identified option

The `-Zunpretty=identified` option (without `expanded`) is effectively useless because `NodeId`s are unassigned prior to macro expansion, leading them to just be `NodeId::MAX_AS_U32`.

This commit removes the `Identified` variant from `PpSourceMode` and removes `-Zunpretty=identified` from the command-line options. Users should use `-Zunpretty=expanded,identified` instead (which is retained) if they want to inspect `NodeId`s.

Fixes rust-lang#10671
…-item, r=workingjubilee

Revert "Allow `global_asm!` in statement positions"

This reverts commit 450cdb5.

Based on discussion in [#t-lang > insta-stable &rust-lang#96;global_asm!&rust-lang#96; as inner items](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/insta-stable.20.60global_asm.21.60.20as.20inner.20items/with/597411711), rust-lang#156582 should not have been merged without FCP.

We've also since found a bug in the implementation (or really, an assumption in the existing code that the PR invalidates), so to re-land this

- new behavior should be behind a feature gate
- the fix in rust-lang#156855 (comment) should be included (and reviewed by someone familiar with `rustc_resolve`)

Then we keep it unstable for a bit, and see if the fuzzer finds anything else. Nothing here is particularly controversial I think, but we need to do our due diligence.

r? @ghost
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 24, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 24, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 24, 2026

📌 Commit 5de5cc7 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 24, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 24, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 24, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 13m 42s
Pushing 423e3d2 to main...

@rust-bors rust-bors Bot merged commit 423e3d2 into rust-lang:main May 24, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 24, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#142611 Do not suggest compatible variants inside macro 7840924e7bb47fc3e6648c9c8041e4440c994a1b (link)
#156692 compiletest: Prepare all simple //@ needs-* conditions in… 5308fa093b2a2bd1da9a086dfa170541de6f0643 (link)
#156847 Fix suggestion of unused variables with raw identifier in s… 3844410fadd224e5dbaeb7bc18da3e94dabaafee (link)
#156876 Remove useless -Zunpretty=identified option b8e3f88eeeb1e6d12c801a567c618086f11a4aff (link)
#156884 Revert "Allow global_asm! in statement positions" 1b1b6fdee1740b4871a1373f8614434a29af84d6 (link)

previous master: 609b8c5cef

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Copy Markdown
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 609b8c5 (parent) -> 423e3d2 (this PR)

Test differences

Show 23 test diffs

Stage 1

  • [ui] tests/ui/asm/statement-global-asm-error.rs: pass -> [missing] (J1)
  • [ui] tests/ui/asm/statement-global-asm.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lint/unused/unused-variable-with-raw-identifier-in-struct-pattern.rs: [missing] -> pass (J1)
  • [ui] tests/ui/typeck/suggestions/suggest-compatible-variants-macro-issue-142359.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/asm/statement-global-asm-error.rs: pass -> [missing] (J0)
  • [ui] tests/ui/asm/statement-global-asm.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lint/unused/unused-variable-with-raw-identifier-in-struct-pattern.rs: [missing] -> pass (J0)
  • [ui] tests/ui/typeck/suggestions/suggest-compatible-variants-macro-issue-142359.rs: [missing] -> pass (J0)

Additionally, 15 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 423e3d2529999d5e57fa0351783d1292b9219ad4 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-arm-linux-gnueabi: 1h -> 1h 30m (+50.2%)
  2. i686-msvc-2: 1h 42m -> 2h 15m (+33.0%)
  3. dist-i686-msvc: 1h 49m -> 2h 24m (+31.7%)
  4. x86_64-gnu-llvm-22-2: 1h 19m -> 1h 42m (+29.2%)
  5. dist-x86_64-msvc-alt: 2h 46m -> 2h 7m (-23.2%)
  6. x86_64-gnu-aux: 1h 52m -> 2h 18m (+23.2%)
  7. x86_64-msvc-1: 2h 1m -> 2h 28m (+22.1%)
  8. x86_64-msvc-ext3: 1h 23m -> 1h 6m (-20.9%)
  9. dist-x86_64-apple: 2h 3m -> 1h 40m (-18.8%)
  10. pr-check-2: 44m 3s -> 36m 22s (-17.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (423e3d2): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 7.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
7.5% [7.5%, 7.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 7.5% [7.5%, 7.5%] 1

Cycles

Results (secondary 3.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.3% [3.0%, 3.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 508.631s -> 511.932s (0.65%)
Artifact size: 400.68 MiB -> 400.68 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants