diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-07-23 09:34:07 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-07-23 09:35:49 -0700 |
| commit | 20f4e5d9c24809031fd6631436f0a7a5b075fe40 (patch) | |
| tree | 04ec2b6aa9813e7c3561310ca0e999d8838e6174 /src/librustc_parse/parser/expr.rs | |
| parent | 9e92106d457abd14f82adc29e7f2496861e07916 (diff) | |
| download | rust-20f4e5d9c24809031fd6631436f0a7a5b075fe40.tar.gz rust-20f4e5d9c24809031fd6631436f0a7a5b075fe40.zip | |
Detect turbofish missing surrounding angle brackets
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
| -rw-r--r-- | src/librustc_parse/parser/expr.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index 3926122606e..d06b172bc14 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -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()` |
