We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
parser/expr.rs
1 parent 5ca6f7d commit ea13023Copy full SHA for ea13023
compiler/rustc_parse/src/parser/expr.rs
@@ -1471,9 +1471,8 @@ impl<'a> Parser<'a> {
1471
} else if self.eat(&token::Comma) {
1472
// Vector with two or more elements.
1473
let sep = SeqSep::trailing_allowed(token::Comma);
1474
- let (remaining_exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
1475
- let mut exprs = vec![first_expr];
1476
- exprs.extend(remaining_exprs);
+ let (mut exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
+ exprs.insert(0, first_expr);
1477
ExprKind::Array(exprs)
1478
} else {
1479
// Vector with one element
0 commit comments