Skip to content

Commit af5ac23

Browse files
committed
simplify parse_dot_call_or_expr
1 parent 7ae12c9 commit af5ac23

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/librustc_parse/parser/expr.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -654,15 +654,11 @@ impl<'a> Parser<'a> {
654654
}
655655

656656
/// Parses `a.b` or `a(13)` or `a[4]` or just `a`.
657-
fn parse_dot_or_call_expr(
658-
&mut self,
659-
already_parsed_attrs: Option<AttrVec>,
660-
) -> PResult<'a, P<Expr>> {
661-
let attrs = self.parse_or_use_outer_attributes(already_parsed_attrs)?;
662-
663-
let b = self.parse_bottom_expr();
664-
let (span, b) = self.interpolated_or_expr_span(b)?;
665-
self.parse_dot_or_call_expr_with(b, span, attrs)
657+
fn parse_dot_or_call_expr(&mut self, attrs: Option<AttrVec>) -> PResult<'a, P<Expr>> {
658+
let attrs = self.parse_or_use_outer_attributes(attrs)?;
659+
let base = self.parse_bottom_expr();
660+
let (span, base) = self.interpolated_or_expr_span(base)?;
661+
self.parse_dot_or_call_expr_with(base, span, attrs)
666662
}
667663

668664
pub(super) fn parse_dot_or_call_expr_with(

0 commit comments

Comments
 (0)