From 7190bc3097a3f84c9d0e07d149eba4b00e4f8917 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sat, 15 May 2021 14:56:28 -0700 Subject: Account for incorrect `impl Foo {}` syntax Fix #84946 --- compiler/rustc_parse/src/parser/expr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser/expr.rs') diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 0c8c45410bd..54f28ea0058 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -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); -- cgit 1.4.1-3-g733a5