diff options
| author | r0cky <mu001999@outlook.com> | 2023-08-03 08:56:31 +0000 |
|---|---|---|
| committer | r0cky <mu001999@outlook.com> | 2023-08-03 08:56:31 +0000 |
| commit | 8c8af6cf99d6a54ece11d21c15e909aef2b60552 (patch) | |
| tree | 849558f48003534aeb92f5c8697536a7bac7f54a /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 41e85c3d2369ebc44c19c6009a061b64d43672ee (diff) | |
| download | rust-8c8af6cf99d6a54ece11d21c15e909aef2b60552.tar.gz rust-8c8af6cf99d6a54ece11d21c15e909aef2b60552.zip | |
Avoid too many expected symbols and reduce `None`s
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 6dafb8b999b..0e19a67a841 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -775,7 +775,7 @@ impl<'a> Parser<'a> { _ => {} } - match self.parse_path(PathStyle::Expr, None) { + match self.parse_path(PathStyle::Expr) { Ok(path) => { let span_after_type = parser_snapshot_after_type.token.span; let expr = mk_expr( @@ -1314,7 +1314,7 @@ impl<'a> Parser<'a> { } let fn_span_lo = self.token.span; - let mut seg = self.parse_path_segment(PathStyle::Expr, None, None)?; + let mut seg = self.parse_path_segment(PathStyle::Expr, None)?; self.check_trailing_angle_brackets(&seg, &[&token::OpenDelim(Delimiter::Parenthesis)]); self.check_turbofish_missing_angle_brackets(&mut seg); @@ -1544,7 +1544,7 @@ impl<'a> Parser<'a> { })?; (Some(qself), path) } else { - (None, self.parse_path(PathStyle::Expr, None)?) + (None, self.parse_path(PathStyle::Expr)?) }; // `!`, as an operator, is prefix, so we know this isn't that. |
