Detect turbofish missing surrounding angle brackets

This commit is contained in:
Esteban Küber 2020-07-23 09:34:07 -07:00
parent 9e92106d45
commit 20f4e5d9c2
5 changed files with 61 additions and 3 deletions

View file

@ -909,8 +909,9 @@ impl<'a> Parser<'a> {
}
let fn_span_lo = self.token.span;
let segment = self.parse_path_segment(PathStyle::Expr)?;
let mut segment = self.parse_path_segment(PathStyle::Expr)?;
self.check_trailing_angle_brackets(&segment, &[&token::OpenDelim(token::Paren)]);
self.check_turbofish_missing_angle_brackets(&mut segment);
if self.check(&token::OpenDelim(token::Paren)) {
// Method call `expr.f()`