diff options
| author | Scott Olson <scott@solson.me> | 2017-01-15 23:36:10 -0800 |
|---|---|---|
| committer | Scott Olson <scott@solson.me> | 2017-01-16 00:45:51 -0800 |
| commit | a9f8f98caabbe388b576f1c277cff51253db6b44 (patch) | |
| tree | 689a3cfc214a85c33024c50d36a3c8346ce52148 /src/libsyntax/parse/parser.rs | |
| parent | ff591b6dc0e0a107c778d0bb4cf103881527e1a5 (diff) | |
| download | rust-a9f8f98caabbe388b576f1c277cff51253db6b44.tar.gz rust-a9f8f98caabbe388b576f1c277cff51253db6b44.zip | |
Rename ExprKind::Vec to Array in HIR and HAIR.
This is a clearer name since they represent [a, b, c] array literals.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 167fa78d7e0..6264b7f3ed3 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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; |
