diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-16 15:54:34 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-16 15:54:34 +1000 |
| commit | d247489ac280147b48c72ed739ea9056e0ca6ff2 (patch) | |
| tree | fdb1daa24642a224a38b0ee5e4c958462f7806a4 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 48cdfc388d67a6bde420d8d44eddf8ef1e5b7eb2 (diff) | |
| download | rust-d247489ac280147b48c72ed739ea9056e0ca6ff2.tar.gz rust-d247489ac280147b48c72ed739ea9056e0ca6ff2.zip | |
Reorder `Parser::parse_expr_dot_or_call_with` arguments.
Put `attrs` before `e0` because that matches the order in the source code, where outer attributes appear before expressions.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index b2df9a14eb0..a1bb047e464 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -885,15 +885,15 @@ impl<'a> Parser<'a> { self.collect_tokens_for_expr(attrs, |this, attrs| { let base = this.parse_expr_bottom()?; let span = this.interpolated_or_expr_span(&base); - this.parse_expr_dot_or_call_with(base, span, attrs) + this.parse_expr_dot_or_call_with(attrs, base, span) }) } pub(super) fn parse_expr_dot_or_call_with( &mut self, + mut attrs: ast::AttrVec, e0: P<Expr>, lo: Span, - mut attrs: ast::AttrVec, ) -> PResult<'a, P<Expr>> { // Stitch the list of outer attributes onto the return value. // A little bit ugly, but the best way given the current code |
