-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Incorrect compiler hint for complicated type handler #64548
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
Comments
input.peek(**token) solved the problem but compiler hints in this case only made this little problem look so terrifying. |
#64565 offers a more succinct version of that hint, suggesting |
Current output (minimal change to suggestion):
We now check if borrowing the argument would make the expression valid and suggest adding |
Triage: output has slightly changed:
|
Current output:
|
I was trying to implement custom macro parser but fall into strange issue.
Having following code
(Playground)
I got an error
So I added
where impl Peek<Token = T>: std::ops::Fn<(syn::lookahead::TokenMarker,)>
to the code and then situation became worse:For the first of them it's ok [for me at least] that compiler can't understand which module is private, however the second and the third make me very confused, because this's the code generated by compiler itself.
The text was updated successfully, but these errors were encountered: