rust/compiler/rustc_parse/src/parser
bors 20b1e05a8d Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov
Suggest that expressions that look like const generic arguments should be enclosed in brackets

I pulled out the changes for const expressions from https://github.com/rust-lang/rust/pull/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 https://github.com/rust-lang/rust/pull/72273.

Fixes https://github.com/rust-lang/rust/issues/70753.

r? `@petrochenkov`
2020-10-27 09:25:54 +00:00
..
attr.rs Only call collect_tokens when we have an attribute to parse 2020-10-22 15:17:40 -04:00
diagnostics.rs Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov 2020-10-27 09:25:54 +00:00
expr.rs Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov 2020-10-27 09:25:54 +00:00
generics.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
item.rs Don't create an empty LazyTokenStream 2020-10-22 10:09:08 -04:00
mod.rs Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov 2020-10-27 09:25:54 +00:00
nonterminal.rs Don't create an empty LazyTokenStream 2020-10-22 10:09:08 -04:00
pat.rs Make inline const work for half open ranges 2020-10-22 13:22:12 -03:00
path.rs Suggest expressions that look like const generic arguments should be enclosed in brackets 2020-10-26 21:54:45 +00:00
stmt.rs Detect blocks that could be struct expr bodies 2020-10-07 13:40:52 -07:00
ty.rs fix typo in docs and comments 2020-09-21 12:14:28 +09:00