-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
#![feature(proc_macro)] breaks some custom derive attributes #52219
Comments
cc @petrochenkov, I'm not really sure what this classifies under, it seems like maybe #50911 although |
This falls under "attribute resolution is mess" and "some things are gated by |
I hit this error last week when trying to update a crate that used |
This commit fixes an apparent mistake in librustc_resolve where when the `proc_macro` feature is enabled (or `rust_2018_preview`) the resolution of custom attributes for custom derive was tweaked. Previously when an attribute failed to resolve it was attempted to locate if there is a custom derive also in scope which declares the attribute, but only the first custom derive directive was search. Instead this commit fixes the loop to search all custom derive invocations looking for any which register the attribute in question. Closes rust-lang#52219
rustc: Search all derives for inert attributes This commit fixes an apparent mistake in librustc_resolve where when the `proc_macro` feature is enabled (or `rust_2018_preview`) the resolution of custom attributes for custom derive was tweaked. Previously when an attribute failed to resolve it was attempted to locate if there is a custom derive also in scope which declares the attribute, but only the first custom derive directive was search. Instead this commit fixes the loop to search all custom derive invocations looking for any which register the attribute in question. Closes #52219
Originally reported as rust-lang/rustfix#126 this is reduced to:
compiles with:
The text was updated successfully, but these errors were encountered: