Skip to content

Suggest that expressions that look like const generic arguments should be enclosed in brackets#77502

Merged
bors merged 1 commit intorust-lang:masterfrom
varkor:const-generics-suggest-enclosing-braces
Oct 27, 2020
Merged

Suggest that expressions that look like const generic arguments should be enclosed in brackets#77502
bors merged 1 commit intorust-lang:masterfrom
varkor:const-generics-suggest-enclosing-braces

Conversation

@varkor
Copy link
Copy Markdown
Contributor

@varkor varkor commented Oct 3, 2020

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` F-const_generics `#![feature(const_generics)]` merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

const_generics: parsing fails with const expression in type parameter

8 participants