Skip to content

Don't allow duplicate attribute parsers #144862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

JonathanBrouwer
Copy link
Contributor

r? @jdonszelmann

Do you anticipate this being needed?

@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2025

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

@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2025

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 Aug 3, 2025
@jdonszelmann
Copy link
Contributor

yea, we're using this right now, at least also in my open PRs for doc and lint attrs. this is the more efficient way to let one attr parser influence other attribute parser. Much better than any strategy in finalize() that looks through the entire list again. In theory this pattern would be valuable to have more of, especially once we start validating.

@JonathanBrouwer
Copy link
Contributor Author

JonathanBrouwer commented Aug 4, 2025

@jdonszelmann Ah ok. Does that mean you're effectively parsing the same attribute twice? It would be nicer if one attribute can see the parsed form of another, or sth like that

@JonathanBrouwer
Copy link
Contributor Author

But since you're using this, I'll close. Just thought I'd do this if there were no plans to use this

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

3 participants