Skip to content

Commit 8adcaf5

Browse files
committed
Mark Parser::expr_is_complete call sites
1 parent 4a80865 commit 8adcaf5

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

@@ -383,8 +383,9 @@ impl<'a> Parser<'a> {
383383
Ok(lhs)
384384
}
385385

386-
fn should_continue_as_assoc_expr(&mut self, lhs: &Expr) -> bool {
387-
match (self.expr_is_complete(lhs), AssocOp::from_token(&self.token)) {
386+
#[allow(non_snake_case)]
387+
fn should_continue_as_assoc_expr_FIXME(&mut self, lhs: &Expr) -> bool {
388+
match (self.expr_is_complete_FIXME(lhs), AssocOp::from_token(&self.token)) {
388389
// Semi-statement forms are odd:
389390
// See https://github.com/rust-lang/rust/issues/29071
390391
(true, None) => false,
@@ -496,7 +497,8 @@ impl<'a> Parser<'a> {
496497
}
497498

498499
/// Checks if this expression is a successfully parsed statement.
499-
fn expr_is_complete(&self, e: &Expr) -> bool {
500+
#[allow(non_snake_case)]
501+
fn expr_is_complete_FIXME(&self, e: &Expr) -> bool {
500502
self.restrictions.contains(Restrictions::STMT_EXPR)
501503
&& match e.kind {
502504
ExprKind::MacCall(_) => false,
@@ -1012,7 +1014,7 @@ impl<'a> Parser<'a> {
10121014
e = self.parse_dot_suffix_expr(lo, e)?;
10131015
continue;
10141016
}
1015-
if self.expr_is_complete(&e) {
1017+
if self.expr_is_complete_FIXME(&e) {
10161018
return Ok(e);
10171019
}
10181020
e = match self.token.kind {

0 commit comments

Comments
 (0)