-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Cannot use use Self::*;
inside a method
#63720
Comments
I would like to try and write a patch for this. @Centril, do you think this would require an RFC first? (Apologies for the ping, you were the last commenter) |
It depends on how we close this ticket: if we extend the language to allow |
I think we decided to "interpret the RFC" when we actually stabilized the feature as not legitimizing this, or to be more accurate, the language team essentially overrode that section of the RFC. (See #61682 for details.) I think it would be best to focus on the diagnostics work right now as supporting |
@Centril: could you point out where in #61682 this is mentioned? I couldn't spot it by glancing through, though the discussion thread is quite long, so I could easily have missed it.
Is this also mentioned in that pull request? Why is this? |
@varkor See the heading "Divergences from RFC". In particular notice how we don't allow
It is not, but it would be ad-hoc, and contrary to the spirit of #61682 (in my view) to support type relative resolution for |
[triagebot] Yeah, |
… r=compiler-errors Better diagnostic for `use Self::..` Fixes rust-lang#111627 cc `@petrochenkov,` you might have thoughts on a better way to handle this (rust-lang#63720 (comment))
It's counterintuitive that this fails. At the very least (if it's not possible to fix this), we should special case the error message to explain the problem.
#49683 (comment) may be related.
The text was updated successfully, but these errors were encountered: