Skip to content

Set up API to make it possible to pass closures instead of AttributeLint#154432

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
GuillaumeGomez:try-rm-AttributeLint
Apr 18, 2026
Merged

Set up API to make it possible to pass closures instead of AttributeLint#154432
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
GuillaumeGomez:try-rm-AttributeLint

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

@GuillaumeGomez GuillaumeGomez commented Mar 26, 2026

View all comments

Part of #153099.

This PR sets up the base implementations needed to remove AttributeLintKind entirely and migrate two variants as examples.

r? @JonathanBrouwer

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 26, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

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.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 26, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 26, 2026

JonathanBrouwer is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Added the missing file and fixed the typo. Time to run a perf check.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Mar 26, 2026
Set up API to make it possible to pass closures instead of `AttributeLint`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 26, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Mar 27, 2026

☀️ Try build successful (CI)
Build commit: 8dcd0b9 (8dcd0b95692c85cfd497ecfb5770e55e4796ba80, parent: 23903d01c237d7c7d4fb62b82ca846bc45de4e0c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8dcd0b9): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.6%, secondary 6.4%)

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

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

Cycles

Results (secondary -2.0%)

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 494.635s -> 485.284s (-1.89%)
Artifact size: 395.08 MiB -> 397.09 MiB (0.51%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 27, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Nice. =D

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

Comment thread compiler/rustc_hir/src/lints.rs Outdated
Comment thread compiler/rustc_attr_parsing/src/attributes/doc.rs
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Fixed merge conflicts.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Solved conflicts

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 17, 2026
…laumeGomez

Don't hash `DelayedLints`

This PR unblocks #154432, and was also a minor perf win locally
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 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.

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Since #155248 got merged, all the blockers for this PR have been removed. =D

Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 18, 2026

📌 Commit ded2eea 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 18, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 18, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #155308 (Make `OnDuplicate::Error` the default for attributes)
 - #154432 (Set up API to make it possible to pass closures instead of `AttributeLint`)
 - #154843 (  Fix conflicting deref move suggestion for LazyLock patterns)
 - #155262 (bootstrap.py: fix duplicated "the")
 - #155478 (Fixed broken documentation link for method lookup in rustc_hir_typeck…)
@rust-bors rust-bors Bot merged commit d12af20 into rust-lang:main Apr 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 18, 2026
rust-timer added a commit that referenced this pull request Apr 18, 2026
Rollup merge of #154432 - GuillaumeGomez:try-rm-AttributeLint, r=JonathanBrouwer

Set up API to make it possible to pass closures instead of `AttributeLint`

Part of #153099.

This PR sets up the base implementations needed to remove `AttributeLintKind` entirely and migrate two variants as examples.

r? @JonathanBrouwer
@GuillaumeGomez GuillaumeGomez deleted the try-rm-AttributeLint branch April 18, 2026 16:05
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 19, 2026
…d, r=JonathanBrouwer

Remove `AttributeLintKind` variants - part 2

Follow-up of rust-lang#154432.
Part of rust-lang#153099.

r? @JonathanBrouwer
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 19, 2026
…d, r=JonathanBrouwer

Remove `AttributeLintKind` variants - part 2

Follow-up of rust-lang#154432.
Part of rust-lang#153099.

r? @JonathanBrouwer
rust-timer added a commit that referenced this pull request Apr 19, 2026
Rollup merge of #155504 - GuillaumeGomez:rm-attributelintkind, r=JonathanBrouwer

Remove `AttributeLintKind` variants - part 2

Follow-up of #154432.
Part of #153099.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants