Auto merge of #80065 - b-naber:parse-angle-arg-diagnostics, r=petrochenkov

Improve diagnostics when parsing angle args

https://github.com/rust-lang/rust/pull/79266 introduced parsing of generic arguments in associated type constraints, this however resulted in possibly very confusing error messages in cases in which closing angle brackets were missing such as in `Vec<(u32, _, _) = vec![]`, which outputs an incorrectly parsed equality constraint error, as noted by `@cynecx.`

This PR tries to provide better error messages in such cases.

r? `@petrochenkov`
This commit is contained in:
bors
2021-01-23 06:27:21 +00:00
17 changed files with 169 additions and 88 deletions

View File

@@ -277,7 +277,7 @@ impl TokenCursor {
}
}
#[derive(Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq)]
enum TokenType {
Token(TokenKind),
Keyword(Symbol),