-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Precedence of type macros is confusing #52307
Comments
The syntax is
Supposedly |
I've got a few questions about this. |
Something like this
No, the |
Well, I didn't know the syntax for a path because noone told me I needed a path. Even now, I don't know what it's needed for. But do you agree that the error messages should me the same? |
Yes, the error message should ideally look like one for
|
Quick note: path doesn't work either:
|
Fixed in #59058 |
syntax: Better recovery for `$ty::AssocItem` and `ty!()::AssocItem` This PR improves on rust-lang#46788 covering a few missing cases. Fixes rust-lang#52307 Fixes rust-lang#53776 r? @estebank
When calling an associated function on a struct, type macros behave very strange and produce weird error messages.
Example on playground
Naturally, one would expect that
TypeMacro!(u8)
is the same asS<u8>
because it is defined that way.The result is the same on all rust versions currently in playground
The text was updated successfully, but these errors were encountered: