Skip to content
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

Parse angle bracket terminating a const generic default value expr #980

Closed
dtolnay opened this issue Mar 26, 2021 · 0 comments · Fixed by #1000
Closed

Parse angle bracket terminating a const generic default value expr #980

dtolnay opened this issue Mar 26, 2021 · 0 comments · Fixed by #1000
Labels

Comments

@dtolnay
Copy link
Owner

dtolnay commented Mar 26, 2021

As seen in the rustc test suite's src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs.

error: expected expression
 --> dev/main.rs:8:39
  |
8 | pub struct Defaulted<const N: usize=3>;
  |                                       ^

It appears we are parsing 3 > ??? as a binary operator expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant