about summary refs log tree commit diff
path: root/src/librustc_parse
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-07 02:30:54 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-23 13:47:52 +0100
commitaf5ac23a23b3e17c47c216858620b01d3b16e471 (patch)
tree9395a7980a61c0580e56319ede070abc0c462cff /src/librustc_parse
parent7ae12c9385230d6589fd0dae267f694338af8b45 (diff)
downloadrust-af5ac23a23b3e17c47c216858620b01d3b16e471.tar.gz
rust-af5ac23a23b3e17c47c216858620b01d3b16e471.zip
simplify parse_dot_call_or_expr
Diffstat (limited to 'src/librustc_parse')
-rw-r--r--src/librustc_parse/parser/expr.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs
index c18cf3565da..24c7654e8ad 100644
--- a/src/librustc_parse/parser/expr.rs
+++ b/src/librustc_parse/parser/expr.rs
@@ -654,15 +654,11 @@ impl<'a> Parser<'a> {
     }
 
     /// Parses `a.b` or `a(13)` or `a[4]` or just `a`.
-    fn parse_dot_or_call_expr(
-        &mut self,
-        already_parsed_attrs: Option<AttrVec>,
-    ) -> PResult<'a, P<Expr>> {
-        let attrs = self.parse_or_use_outer_attributes(already_parsed_attrs)?;
-
-        let b = self.parse_bottom_expr();
-        let (span, b) = self.interpolated_or_expr_span(b)?;
-        self.parse_dot_or_call_expr_with(b, span, attrs)
+    fn parse_dot_or_call_expr(&mut self, attrs: Option<AttrVec>) -> PResult<'a, P<Expr>> {
+        let attrs = self.parse_or_use_outer_attributes(attrs)?;
+        let base = self.parse_bottom_expr();
+        let (span, base) = self.interpolated_or_expr_span(base)?;
+        self.parse_dot_or_call_expr_with(base, span, attrs)
     }
 
     pub(super) fn parse_dot_or_call_expr_with(