-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Suggest that expressions that look like const generic arguments should be enclosed in brackets #77502
Suggest that expressions that look like const generic arguments should be enclosed in brackets #77502
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up @varkor!
src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs
Show resolved
Hide resolved
src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs
Show resolved
Hide resolved
debf4a7
to
5f8aa8a
Compare
I'll get to this next weekend most likely. |
...nst-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs
Show resolved
Hide resolved
c23db00
to
b03e75e
Compare
@petrochenkov: I've moved the functions to |
@petrochenkov: I've added some more tests. The error messages in these cases are not ideal, but they're particularly difficult to handle well. |
e4f2b91
to
9aa3cfb
Compare
Handling |
r=me with commits squashed. |
…enclosed in brackets Co-Authored-By: Esteban Kuber <[email protected]>
9aa3cfb
to
ac14540
Compare
@bors r=petrochenkov |
📌 Commit ac14540 has been approved by |
☀️ Test successful - checks-actions |
I pulled out the changes for const expressions from #71592 (without the trait object diagnostic changes) and made some small changes; the implementation is @estebank's.
We're also going to want to make some changes separately to account for trait objects (they result in poor diagnostics, as is evident from one of the test cases here), such as an adaption of #72273.
Fixes #70753.
r? @petrochenkov