Rename ExprKind::Vec to Array in HIR and HAIR.
This is a clearer name since they represent [a, b, c] array literals.
This commit is contained in:
parent
ff591b6dc0
commit
a9f8f98caa
14 changed files with 17 additions and 17 deletions
|
@ -2140,7 +2140,7 @@ impl<'a> Parser<'a> {
|
|||
if self.check(&token::CloseDelim(token::Bracket)) {
|
||||
// Empty vector.
|
||||
self.bump();
|
||||
ex = ExprKind::Vec(Vec::new());
|
||||
ex = ExprKind::Array(Vec::new());
|
||||
} else {
|
||||
// Nonempty vector.
|
||||
let first_expr = self.parse_expr()?;
|
||||
|
@ -2160,11 +2160,11 @@ impl<'a> Parser<'a> {
|
|||
)?;
|
||||
let mut exprs = vec![first_expr];
|
||||
exprs.extend(remaining_exprs);
|
||||
ex = ExprKind::Vec(exprs);
|
||||
ex = ExprKind::Array(exprs);
|
||||
} else {
|
||||
// Vector with one element.
|
||||
self.expect(&token::CloseDelim(token::Bracket))?;
|
||||
ex = ExprKind::Vec(vec![first_expr]);
|
||||
ex = ExprKind::Array(vec![first_expr]);
|
||||
}
|
||||
}
|
||||
hi = self.prev_span.hi;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue