Skip to content

Remove attribute parsing Stage#155775

Merged
rust-bors[bot] merged 5 commits intorust-lang:mainfrom
JonathanBrouwer:cleanup_stage
Apr 29, 2026
Merged

Remove attribute parsing Stage#155775
rust-bors[bot] merged 5 commits intorust-lang:mainfrom
JonathanBrouwer:cleanup_stage

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 25, 2026

View all comments

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

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 25, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 25, 2026
@JonathanBrouwer JonathanBrouwer changed the title Cleanup Stage Cleanup attribute parsing Stage Apr 25, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 25, 2026

☀️ Try build successful (CI)
Build commit: 0f16d2c (0f16d2c2b65c0f611f58ef7ec91415060e26d515, parent: fb76025f2fe6a1c8ce03fe0931f941c8077a2c34)

@rust-timer

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer changed the title Cleanup attribute parsing Stage Remove attribute parsing Stage Apr 25, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0f16d2c): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (secondary 6.1%)

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)
6.1% [6.0%, 6.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 2.6%)

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)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (secondary 0.1%)

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)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 487.131s -> 486.905s (-0.05%)
Artifact size: 394.07 MiB -> 394.02 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 25, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue
Made some more changes, so lets rerun to be sure

@rust-timer

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer marked this pull request as ready for review April 25, 2026 17:09
@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 25, 2026

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

Some changes occurred to diagnostic attributes.

cc @mejrs

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@rustbot rustbot added S-waiting-on-perf Status: Waiting on a perf run to be completed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 25, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 25, 2026
@rust-log-analyzer

This comment has been minimized.

@Bryntet
Copy link
Copy Markdown
Contributor

Bryntet commented Apr 25, 2026

Wow this is a very nice change!!

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 25, 2026

☀️ Try build successful (CI)
Build commit: 1605ec0 (1605ec0500eb4d5265572f443e427b9ceb0d6307, parent: fb76025f2fe6a1c8ce03fe0931f941c8077a2c34)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (1605ec0): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 2
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 8
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 2

Max RSS (memory usage)

Results (primary -0.7%, secondary 1.1%)

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

mean range count
Regressions ❌
(primary)
0.6% [0.6%, 0.6%] 1
Regressions ❌
(secondary)
6.2% [5.9%, 6.5%] 2
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-2.3% [-2.5%, -2.1%] 3
All ❌✅ (primary) -0.7% [-2.1%, 0.6%] 2

Cycles

Results (primary 2.4%, secondary 0.6%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.5% [2.0%, 3.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.1%, -3.1%] 1
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (secondary 0.1%)

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)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 487.131s -> 488.391s (0.26%)
Artifact size: 394.07 MiB -> 393.58 MiB (-0.12%)

@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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 29, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r=jdonszelmann,petrochenkov p=6
Scheduling this before the next rollup, very bitrotty

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 29, 2026

📌 Commit 08babc8 has been approved by jdonszelmann,petrochenkov

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 29, 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 Apr 29, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 29, 2026

☀️ Test successful - CI
Approved by: jdonszelmann,petrochenkov
Duration: 3h 11m 51s
Pushing 0424cc1 to main...

@rust-bors rust-bors Bot merged commit 0424cc1 into rust-lang:main Apr 29, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 29, 2026
@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 4f9e4e1 (parent) -> 0424cc1 (this PR)

Test differences

Show 4 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 0424cc16731e6141a18077f8ccde77ba148d9649 --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-various-2: 34m 53s -> 43m 17s (+24.1%)
  2. dist-x86_64-llvm-mingw: 1h 57m -> 1h 29m (-23.8%)
  3. pr-check-1: 33m 6s -> 27m 11s (-17.9%)
  4. armhf-gnu: 1h 12m -> 1h 25m (+17.5%)
  5. dist-x86_64-apple: 2h 1m -> 2h 21m (+17.1%)
  6. dist-aarch64-apple: 1h 45m -> 2h 3m (+16.3%)
  7. aarch64-apple: 3h 17m -> 2h 49m (-14.4%)
  8. dist-x86_64-mingw: 2h 28m -> 2h 10m (-12.1%)
  9. x86_64-msvc-2: 2h 19m -> 2h 34m (+10.7%)
  10. x86_64-mingw-1: 2h 44m -> 3h 1m (+9.9%)
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 (0424cc1): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.0% [0.0%, 0.0%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.1%] 10
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.2%, secondary -1.5%)

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

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.6%, -1.4%] 2
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Cycles

Results (secondary 1.2%)

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)
7.8% [4.1%, 10.5%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-4.8%, -1.5%] 5
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 486.853s -> 481.379s (-1.12%)
Artifact size: 395.46 MiB -> 390.96 MiB (-1.14%)

@rustbot rustbot added the perf-regression Performance regression. label Apr 29, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@rustbot label: +perf-regression-triaged
Net positive, regressions are probably noise and very small regardless

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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