Skip to content

Do attribute target checking on parameters with the new system - #165193

Open
JonathanBrouwer wants to merge 4 commits into
rust-lang:mainfrom
JonathanBrouwer:param-targets
Open

JonathanBrouwer wants to merge 4 commits into
rust-lang:mainfrom
JonathanBrouwer:param-targets

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

This removes a bunch of duplicate diagnostics :)
Behavior should be preserved, in the sense that any code error after this change if and only if it did before this change.

This is necessary so the change in the next commit still goes into this path.
@rustbot

rustbot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@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 Oct 30, 2026
@rustbot

rustbot commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
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 77 candidates
  • Random selection from 22 candidates

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

Maybe
r? @mejrs

@rustbot rustbot assigned mejrs and unassigned dingxiangfei2009 Oct 30, 2026
@rust-log-analyzer

This comment has been minimized.

@mejrs mejrs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shower thought: AllowListWarnRest is kinda dangerous if it means all uses of it have to be updated whenever a new variant is added to Target...

View changes since this review

|
LL | fn foo(#[doc(alias = "qux")] _x: u32) -> Self::X {
| ^^^^^^^^^^^^^^^^^^^^^
| ^^^^^

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's up with this span?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed!

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

Shower thought: AllowListWarnRest is kinda dangerous if it means all uses of it have to be updated whenever a new variant is added to Target...

Yep, I've also been thinking that... Maybe we should get rid of it (not this PR tho)

@rust-bors

rust-bors Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #165234) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
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.

5 participants