diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2016-09-20 16:54:24 +0200 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2016-09-28 22:31:18 +0200 |
| commit | 48e5199de366ed2945d1103f0b6c8aa542604ebb (patch) | |
| tree | d5386e43fc15642d98058fa10a7fa29843237f93 /src/libsyntax/parse/parser.rs | |
| parent | cf0b7bdd0c2920fcf77da6608d4829945a110b7e (diff) | |
| download | rust-48e5199de366ed2945d1103f0b6c8aa542604ebb.tar.gz rust-48e5199de366ed2945d1103f0b6c8aa542604ebb.zip | |
libsyntax: clearer names for some AST parts
This applies the HIR changes from the previous commits to the AST, and is thus a syntax-[breaking-change] Renames `PatKind::Vec` to `PatKind::Slice`, since these are called slice patterns, not vec patterns. Renames `TyKind::Vec`, which represents the type `[T]`, to `TyKind::Slice`. Renames `TyKind::FixedLengthVec` to `TyKind::Array`.
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 d5ed1d157e4..de7baf04b54 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) { |
