-
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
Wrong error message when using Self
in some places
#24968
Comments
There is a similar issue: #12796 file. |
No, that's a different issue. |
Do you mean
and there is excluding self type code。
https://github.com/XuefengWu/rust/blob/master/src/libsyntax/parse/parser.rs#L558-L564 |
My point is that we are in different situation now. |
Actually, IIRC we're moving towards a direction where |
Yes we can use it in traits or impls. trait T where Self: Sized {} is totally legal for instance. But |
Oh, sorry, this was a global fn. Makes sense. |
Self
is a keyword, this error message indicates that it can be used to define type, which is misleading.The text was updated successfully, but these errors were encountered: