about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-09-30 17:43:22 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-10-01 19:22:12 +0530
commit259d1fcd478f868a9980cdce63f7556f30d55b90 (patch)
tree7c62918f45426420e0f034eb572ead5f41ba0398 /src/libsyntax/parse
parenta73ba8b98caaec7f7f6281dca9a73ad876f59266 (diff)
parentbc2b28387c7373d183d2eec6798521dcc4d51643 (diff)
downloadrust-259d1fcd478f868a9980cdce63f7556f30d55b90.tar.gz
rust-259d1fcd478f868a9980cdce63f7556f30d55b90.zip
Rollup merge of #36599 - jonas-schievink:whats-a-pirates-favorite-data-structure, r=pnkfelix
 Contains a syntax-[breaking-change] as a separate commit (cc #31645).nnAlso renames slice patterns from `PatKind::Vec` to `PatKind::Slice`.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5476166932d..b3fa8a2a5b0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1386,8 +1386,8 @@ impl<'a> Parser<'a> {
             // Parse the `; e` in `[ i32; e ]`
             // where `e` is a const expression
             let t = match self.maybe_parse_fixed_length_of_vec()? {
-                None => TyKind::Vec(t),
-                Some(suffix) => TyKind::FixedLengthVec(t, suffix)
+                None => TyKind::Slice(t),
+                Some(suffix) => TyKind::Array(t, suffix)
             };
             self.expect(&token::CloseDelim(token::Bracket))?;
             t
@@ -3587,7 +3587,7 @@ impl<'a> Parser<'a> {
                 self.bump();
                 let (before, slice, after) = self.parse_pat_vec_elements()?;
                 self.expect(&token::CloseDelim(token::Bracket))?;
-                pat = PatKind::Vec(before, slice, after);
+                pat = PatKind::Slice(before, slice, after);
             }
             // At this point, token != _, &, &&, (, [
             _ => if self.eat_keyword(keywords::Mut) {