about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-02-17 16:24:22 -0800
committerNoah Lev <camelidcamel@gmail.com>2022-03-23 22:31:57 -0700
commit29a5c363c7af619c1264c8b1e80241e503b27b47 (patch)
tree9fccd90ce93775257d2f9a044e12cfd3cf8ff637 /compiler/rustc_parse/src/parser
parent713a11b9197d2b4d1a02fabfe04fe6446c5da292 (diff)
downloadrust-29a5c363c7af619c1264c8b1e80241e503b27b47.tar.gz
rust-29a5c363c7af619c1264c8b1e80241e503b27b47.zip
Improve function names
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs4
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index dcb150f18aa..4f2a308f2e9 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -1220,7 +1220,7 @@ impl<'a> Parser<'a> {
         Ok(())
     }
 
-    pub(super) fn maybe_recover_from_prefix_increment(
+    pub(super) fn recover_from_prefix_increment(
         &mut self,
         operand_expr: P<Expr>,
         op_span: Span,
@@ -1235,7 +1235,7 @@ impl<'a> Parser<'a> {
         self.recover_from_inc_dec(operand_expr, kind, op_span)
     }
 
-    pub(super) fn maybe_recover_from_postfix_increment(
+    pub(super) fn recover_from_postfix_increment(
         &mut self,
         operand_expr: P<Expr>,
         op_span: Span,
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index c9864fb9fa3..8ac29c2b5f6 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -273,7 +273,7 @@ impl<'a> Parser<'a> {
                 let op_span = self.prev_token.span.to(self.token.span);
                 // Eat the second `+`
                 self.bump();
-                lhs = self.maybe_recover_from_postfix_increment(lhs, op_span)?;
+                lhs = self.recover_from_postfix_increment(lhs, op_span)?;
                 continue;
             }
 
@@ -601,7 +601,7 @@ impl<'a> Parser<'a> {
                 this.bump();
 
                 let operand_expr = this.parse_dot_or_call_expr(Default::default())?;
-                this.maybe_recover_from_prefix_increment(operand_expr, pre_span, prev_is_semi)
+                this.recover_from_prefix_increment(operand_expr, pre_span, prev_is_semi)
             }
             token::Ident(..) if this.token.is_keyword(kw::Box) => {
                 make_it!(this, attrs, |this, _| this.parse_box_expr(lo))