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