-
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
derive-new errors #66525
Labels
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Comments
nikomatsakis
added
I-nominated
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
labels
Nov 18, 2019
(Nominated for @rust-lang/lang discussion around the breakage policy/implications here.) |
Duplicate of #66508, I'll prepare a fix. |
Or rather a "tiebreaker" for the ambiguity, since both names are indeed in scope and create ambiguity, which is correctly detected after #64694. |
Fixed in #66529. |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Nov 19, 2019
resolve: Give derive helpers highest priority during resolution So they just shadow everything else and don't create ambiguity errors. This matches the old pre-rust-lang#64694 behavior most closely. --- The change doesn't apply to this "compatibility" case ```rust #[trait_helper] // The helper attribute is used before it introduced. // Sadly, compiles on stable, supported via hacks. // I plan to make a compatibility warning for this. #[derive(Trait)] struct S; ``` , such attributes still create ambiguities, but rust-lang#64694 didn't change anything for this case. Fixes rust-lang#66508 Fixes rust-lang#66525
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So @wycats pointed out to me that some recent changes in name resolution seem to have broken
derive_new
. They pointed me at this commit from nushell dealing with the fallout -- @jonathandturner maybe you can leave a few notes as to what errors you were seeing before this commit?cc @petrochenkov -- could this be the recent changes around name resolution of helper attributes in macros? It seems the relevant code is stuff like:
The text was updated successfully, but these errors were encountered: