-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Create AttrTarget
for attribute parsing
#143284
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
base: master
Are you sure you want to change the base?
Conversation
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_attr_parsing |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #143363) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #143645) made this pull request unmergeable. Please resolve the merge conflicts. |
I did look at this version, and asked @JonathanBrouwer to come up with a version that'd combine this PR and my version which I pushed to my fork a while ago. I'll compare the two implementations. That version is #145085 |
I see. The primary motivation for my approach where the target enum references the ast of the target is that it lets us move a lot of logic from various passes (not only CheckAttr) into attribute parsing. That's what I'm missing from your and jonathan's versions. |
hmm, I quite like reusing the old Target, and the current version is quite declarative which I liked a lot. I'm sorry, but I'm not sure I'd want to do in this direction. |
I went back and forth on the design a bit, this is what I settled on.
r? @jdonszelmann