-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Disallow attribute macros named cfg #53531
Comments
I think this would be a good issue for mentoring. I'm happy to help out. |
The |
I could give it a go. As a first time contributor please be patient 😉 |
@Havvy Yeah, though that's not by necessity, so I wanna do a crater run and see if we could give it normal resolution. |
@otavio That's awesome! I'm happy to help in any way you need. I recommend taking a look at |
I'd check it during name resolution instead, so you can do |
I have a PR in progress that resolves the penultimate item in #50911 (comment) and passes all attributes through name resolution, that includes (Disallowing proc macros named |
@petrochenkov Ah yeah I hadn't thought about that! That's awesome. |
resolve: Future proof resolutions for potentially built-in attributes Based on #53778 This is not full "pass all attributes through name resolution", but a more conservative solution. If built-in attribute is ambiguous with any other macro in scope, then an error is reported. TODO: Explain what complications arise with the full solution. cc #50911 (comment) Closes #53531
resolve: Future proof resolutions for potentially built-in attributes This is not full "pass all attributes through name resolution", but a more conservative solution. If built-in attribute is ambiguous with any other macro in scope, then an error is reported. What complications arise with the full solution - #53913 (comment). cc #50911 (comment) cc #52269 Closes #53531
#[cfg()]
runs before name resolution so no proc macro attribute namedcfg
could ever be called. We should make this a hard error at the declaration site to protect people from this confusion.The text was updated successfully, but these errors were encountered: