-
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
Trailing +
in bounds are allowed
#41158
Comments
This works as expected, see #39158 for the discussion.
I forgot to update the comment :( Marking this as a documentation issue so someone could fix the comment and grammar.md. |
Hi there! I'd like to fix this. I'll remove the |
@alexeyzab |
@petrochenkov Good point, my bad. Thanks for pointing that out! |
Adjusted the comment and made a new paragraph for the current grammar. Let me know if this is okay. |
Current parser allows ty/lt bounds have extra
+
. However, the comments on the parser suggest they shouldn't be allowed. grammar.md also suggests they shouldn't.Expected behavior
Both the first and second lines should lead to parse error.
Current behavior
The current stable and nightly compilers allow the above code.
Meta
Tested on Rust Playground.
stable
nightly
The text was updated successfully, but these errors were encountered: