-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Wrong error message when using Self
in some places
#24968
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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: