Skip to content

rustc_resolve: move diagnostic attribute linting to attr parsing - #160499

Open
mejrs wants to merge 1 commit into
rust-lang:mainfrom
mejrs:move_diagnostic_attr_not_found_lint
Open

rustc_resolve: move diagnostic attribute linting to attr parsing#160499
mejrs wants to merge 1 commit into
rust-lang:mainfrom
mejrs:move_diagnostic_attr_not_found_lint

Conversation

@mejrs

@mejrs mejrs commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

It was in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there.

Also improves some spans.

This change also makes it so that unknown diagnostic attributes are removed, rather than stay as unparsed attributes.

@rustbot

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

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

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

r? @folkertdev

rustbot has assigned @folkertdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 20 candidates

Comment thread compiler/rustc_attr_parsing/src/attributes/diagnostic/mod.rs Outdated
Comment thread compiler/rustc_attr_parsing/src/interface.rs Outdated
@rustbot rustbot added 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 5, 2026
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@mejrs
mejrs force-pushed the move_diagnostic_attr_not_found_lint branch from 467a96d to df6106e Compare August 5, 2026 15:36
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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.

It had to be in rustc_resolve because there was no general attribute parsing infra back then, but now there is, so it should be there
@mejrs
mejrs force-pushed the move_diagnostic_attr_not_found_lint branch from df6106e to cd19505 Compare August 5, 2026 16:45
@mejrs

mejrs commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

I've addressed both comments as well as added a "this is an experimental diagnostic attribute" note.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 5, 2026
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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants