Skip to content

Revert "Port lint attributes to attribute parser"#155056

Merged
rust-bors[bot] merged 5 commits intorust-lang:mainfrom
JonathanBrouwer:revert-lint-port
Apr 10, 2026
Merged

Revert "Port lint attributes to attribute parser"#155056
rust-bors[bot] merged 5 commits intorust-lang:mainfrom
JonathanBrouwer:revert-lint-port

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented Apr 9, 2026

This PR reverts the following two PRs:

This was not a clean revert, I manually solved several merge conflicts.

Closes #154878
Closes #154800
Closes #155008
Re-opens #132218 (this was never closed, oops)

r? @ghost

This reverts commit 0c94559, reversing
changes made to 3352861.
The regressions are documented in the PR comments.
This reverts commit 2972b5e, reversing changes made to f908263.
@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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 9, 2026
@JonathanBrouwer JonathanBrouwer changed the title Revert port lint attributes to attribute parser Revert "Port lint attributes to attribute parser" Apr 9, 2026
@JonathanBrouwer JonathanBrouwer marked this pull request as ready for review April 9, 2026 17:06
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

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

cc @jdonszelmann

@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 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@matthiaskrgr
Copy link
Copy Markdown
Member

are there any tests for the issues being closed?

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

JonathanBrouwer commented Apr 9, 2026

Not yet, I should include those, good idea

@apiraino apiraino removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 9, 2026
JonathanBrouwer and others added 3 commits April 9, 2026 20:34
Co-authored-by: Edvin Bryntesson <epost@edvinbryntesson.se>
Co-authored-by: Edvin Bryntesson <epost@edvinbryntesson.se>
Co-authored-by: Edvin Bryntesson <epost@edvinbryntesson.se>
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

JonathanBrouwer commented Apr 9, 2026

I added the regression tests
r? compiler

@lqd
Copy link
Copy Markdown
Member

lqd commented Apr 9, 2026

Thanks a ton. This looks completely sensible to me, so r=me when green.

@apiraino
Copy link
Copy Markdown
Contributor

apiraino commented Apr 9, 2026

thank you so much @JonathanBrouwer <3

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r=lqd,mati865 rollup=never p=10
rollup=never because of perf effects (and this is a massive pr)
p=10 because I would love this to be merged before the beta cutoff

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 9, 2026

📌 Commit 9c3661d has been approved by lqd,mati865

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 Apr 9, 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 10, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 10, 2026

☀️ Test successful - CI
Approved by: lqd,mati865
Duration: 3h 15m 6s
Pushing dd82fd2 to main...

@rust-bors rust-bors bot merged commit dd82fd2 into rust-lang:main Apr 10, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 10, 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 f5eca4f (parent) -> dd82fd2 (this PR)

Test differences

Show 116 test diffs

Stage 1

  • [incremental] tests/incremental/cache-lint-expectation.rs: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/lints/renamed-lint-still-applies-2.rs: pass -> [missing] (J2)
  • [ui] tests/ui/error-codes/E0452.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/malformed-expect.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/pre-expansion-expect.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/error-codes/E0452.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/malformed-expect.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/pre-expansion-expect.rs: [missing] -> pass (J0)
  • [incremental] tests/incremental/cache-lint-expectation.rs: [missing] -> pass (J1)
  • [ui] tests/rustdoc-ui/lints/renamed-lint-still-applies-2.rs: pass -> [missing] (J3)

Additionally, 106 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 dd82fd2034e5c86c6f0f8070dc5679703cc4fe03 --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. test-various: 1h 30m -> 2h 10m (+45.0%)
  2. i686-msvc-1: 2h 15m -> 3h 6m (+37.1%)
  3. dist-apple-various: 2h 6m -> 1h 30m (-28.7%)
  4. dist-x86_64-mingw: 2h 38m -> 2h 2m (-22.7%)
  5. x86_64-gnu-llvm-22-1: 1h 4m -> 1h 16m (+17.1%)
  6. pr-check-1: 28m 13s -> 33m 1s (+17.1%)
  7. x86_64-gnu-llvm-21-3: 1h 44m -> 1h 58m (+13.5%)
  8. optional-x86_64-gnu-parallel-frontend: 2h 23m -> 2h 41m (+12.5%)
  9. i686-gnu-1: 2h 7m -> 2h 23m (+12.5%)
  10. x86_64-gnu-tools: 57m 9s -> 1h 3m (+11.5%)
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 (dd82fd2): comparison URL.

Overall result: ❌ regressions - 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.2% [0.1%, 0.6%] 24
Regressions ❌
(secondary)
0.4% [0.1%, 1.0%] 39
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.0%] 4
All ❌✅ (primary) 0.2% [0.1%, 0.6%] 24

Max RSS (memory usage)

Results (primary 0.6%, secondary -3.1%)

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

mean range count
Regressions ❌
(primary)
1.0% [0.9%, 1.1%] 3
Regressions ❌
(secondary)
1.2% [0.8%, 1.7%] 2
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-3.9% [-7.3%, -1.5%] 11
All ❌✅ (primary) 0.6% [-0.4%, 1.1%] 4

Cycles

Results (primary -3.3%, secondary -2.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)
3.5% [3.2%, 3.8%] 2
Improvements ✅
(primary)
-3.3% [-4.4%, -2.1%] 6
Improvements ✅
(secondary)
-3.9% [-4.6%, -3.2%] 6
All ❌✅ (primary) -3.3% [-4.4%, -2.1%] 6

Binary size

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

Bootstrap: 490.573s -> 488.849s (-0.35%)
Artifact size: 395.57 MiB -> 395.54 MiB (-0.01%)

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. T-clippy Relevant to the Clippy team. 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.

#[expect] doesn't work anymore with pre-expansion early lints [ICE]: cannot decode AttrId with CacheDecoder [ICE]: malformed lint attributes

7 participants