Auto merge of #85346 - estebank:issue-84946, r=nagisa,varkor

Account for incorrect `impl Foo<const N: ty> {}` syntax

Fix #84946
This commit is contained in:
bors
2021-11-25 05:09:51 +00:00
10 changed files with 239 additions and 64 deletions

View File

@@ -1150,7 +1150,7 @@ impl<'a> Parser<'a> {
}
let fn_span_lo = self.token.span;
let mut segment = self.parse_path_segment(PathStyle::Expr)?;
let mut segment = self.parse_path_segment(PathStyle::Expr, None)?;
self.check_trailing_angle_brackets(&segment, &[&token::OpenDelim(token::Paren)]);
self.check_turbofish_missing_angle_brackets(&mut segment);