From 031206bc1d16edcc963a1d0987ad37448a4cc019 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Tue, 28 Feb 2023 19:28:14 +0400 Subject: micro fmt changes --- compiler/rustc_parse/src/parser/diagnostics.rs | 1 + compiler/rustc_parse/src/parser/expr.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_parse') diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 779fd90627b..78e4f3581b9 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -1368,6 +1368,7 @@ impl<'a> Parser<'a> { }; self.recover_from_inc_dec(operand_expr, kind, op_span) } + fn recover_from_inc_dec( &mut self, base: P, diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index ec50388cb46..828c268b588 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -281,6 +281,7 @@ impl<'a> Parser<'a> { lhs = self.recover_from_postfix_increment(lhs, op_span, starts_stmt)?; continue; } + if self.prev_token == token::BinOp(token::Minus) && self.token == token::BinOp(token::Minus) && self.prev_token.span.between(self.token.span).is_empty() @@ -606,7 +607,6 @@ impl<'a> Parser<'a> { let operand_expr = this.parse_dot_or_call_expr(Default::default())?; this.recover_from_prefix_increment(operand_expr, pre_span, starts_stmt) } - token::Ident(..) if this.token.is_keyword(kw::Box) => { make_it!(this, attrs, |this, _| this.parse_box_expr(lo)) } -- cgit 1.4.1-3-g733a5