Skip to content

Commit 923527a

Browse files
committed
Mark Parser::expr_is_complete call sites
1 parent 5aac067 commit 923527a

File tree

1 file changed

+7
-5
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+7
-5
lines changed

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<'a> Parser<'a> {
190190
}
191191
};
192192

193-
if !self.should_continue_as_assoc_expr(&lhs) {
193+
if !self.should_continue_as_assoc_expr_FIXME(&lhs) {
194194
return Ok(lhs);
195195
}
196196

@@ -381,8 +381,9 @@ impl<'a> Parser<'a> {
381381
Ok(lhs)
382382
}
383383

384-
fn should_continue_as_assoc_expr(&mut self, lhs: &Expr) -> bool {
385-
match (self.expr_is_complete(lhs), AssocOp::from_token(&self.token)) {
384+
#[allow(non_snake_case)]
385+
fn should_continue_as_assoc_expr_FIXME(&mut self, lhs: &Expr) -> bool {
386+
match (self.expr_is_complete_FIXME(lhs), AssocOp::from_token(&self.token)) {
386387
// Semi-statement forms are odd:
387388
// See https://github.com/rust-lang/rust/issues/29071
388389
(true, None) => false,
@@ -482,7 +483,8 @@ impl<'a> Parser<'a> {
482483
}
483484

484485
/// Checks if this expression is a successfully parsed statement.
485-
fn expr_is_complete(&self, e: &Expr) -> bool {
486+
#[allow(non_snake_case)]
487+
fn expr_is_complete_FIXME(&self, e: &Expr) -> bool {
486488
self.restrictions.contains(Restrictions::STMT_EXPR)
487489
&& match e.kind {
488490
ExprKind::MacCall(_) => false,
@@ -990,7 +992,7 @@ impl<'a> Parser<'a> {
990992
e = self.parse_dot_suffix_expr(lo, e)?;
991993
continue;
992994
}
993-
if self.expr_is_complete(&e) {
995+
if self.expr_is_complete_FIXME(&e) {
994996
return Ok(e);
995997
}
996998
e = match self.token.kind {

0 commit comments

Comments
 (0)