diff options
| author | David Tolnay <dtolnay@gmail.com> | 2023-12-29 16:13:55 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-05-11 15:49:51 -0700 |
| commit | 8adcaf5df27ac63b5e83612bd08cae12d3d1725e (patch) | |
| tree | b3e62408c693896394ea775e52f3b1b08c0b8a4d /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 4a80865437f03e918225ed13ce692122e32c8045 (diff) | |
| download | rust-8adcaf5df27ac63b5e83612bd08cae12d3d1725e.tar.gz rust-8adcaf5df27ac63b5e83612bd08cae12d3d1725e.zip | |
Mark Parser::expr_is_complete call sites
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 5f7bd0835d3..602dbbb5725 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -190,7 +190,7 @@ impl<'a> Parser<'a> { } }; - if !self.should_continue_as_assoc_expr(&lhs) { + if !self.should_continue_as_assoc_expr_FIXME(&lhs) { return Ok(lhs); } @@ -383,8 +383,9 @@ impl<'a> Parser<'a> { Ok(lhs) } - fn should_continue_as_assoc_expr(&mut self, lhs: &Expr) -> bool { - match (self.expr_is_complete(lhs), AssocOp::from_token(&self.token)) { + #[allow(non_snake_case)] + fn should_continue_as_assoc_expr_FIXME(&mut self, lhs: &Expr) -> bool { + match (self.expr_is_complete_FIXME(lhs), AssocOp::from_token(&self.token)) { // Semi-statement forms are odd: // See https://github.com/rust-lang/rust/issues/29071 (true, None) => false, @@ -496,7 +497,8 @@ impl<'a> Parser<'a> { } /// Checks if this expression is a successfully parsed statement. - fn expr_is_complete(&self, e: &Expr) -> bool { + #[allow(non_snake_case)] + fn expr_is_complete_FIXME(&self, e: &Expr) -> bool { self.restrictions.contains(Restrictions::STMT_EXPR) && match e.kind { ExprKind::MacCall(_) => false, @@ -1012,7 +1014,7 @@ impl<'a> Parser<'a> { e = self.parse_dot_suffix_expr(lo, e)?; continue; } - if self.expr_is_complete(&e) { + if self.expr_is_complete_FIXME(&e) { return Ok(e); } e = match self.token.kind { |
