Renames to match rust-lang/rust#36599
diff --git a/src/expr.rs b/src/expr.rs
index ecdb05f..821e264 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -277,8 +277,8 @@
/// A range pattern, e.g. `1...2`
Range(Box<Lit>, Box<Lit>),
/// `[a, b, ..i, y, z]` is represented as:
- /// `Pat::Vec(box [a, b], Some(i), box [y, z])`
- Vec(Vec<Pat>, Option<Box<Pat>>, Vec<Pat>),
+ /// `Pat::Slice(box [a, b], Some(i), box [y, z])`
+ Slice(Vec<Pat>, Option<Box<Pat>>, Vec<Pat>),
/// A macro pattern; pre-expansion
Mac(Mac),
}
@@ -1496,7 +1496,7 @@
tokens.append("...");
hi.to_tokens(tokens);
}
- Pat::Vec(ref _before, ref _dots, ref _after) => unimplemented!(),
+ Pat::Slice(ref _before, ref _dots, ref _after) => unimplemented!(),
Pat::Mac(ref mac) => mac.to_tokens(tokens),
}
}
diff --git a/src/ty.rs b/src/ty.rs
index 872ab1f..dd81fac 100644
--- a/src/ty.rs
+++ b/src/ty.rs
@@ -4,9 +4,9 @@
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum Ty {
/// A variable-length array (`[T]`)
- Vec(Box<Ty>),
+ Slice(Box<Ty>),
/// A fixed length array (`[T; n]`)
- FixedLengthVec(Box<Ty>, usize),
+ Array(Box<Ty>, usize),
/// A raw pointer (`*const T` or `*mut T`)
Ptr(Box<MutTy>),
/// A reference (`&'a T` or `&'a mut T`)
@@ -226,7 +226,7 @@
punct!("[") >>
elem: ty >>
punct!("]") >>
- (Ty::Vec(Box::new(elem)))
+ (Ty::Slice(Box::new(elem)))
));
named!(ty_fixed_length_vec -> Ty, do_parse!(
@@ -235,7 +235,7 @@
punct!(";") >>
len: int >>
punct!("]") >>
- (Ty::FixedLengthVec(Box::new(elem), len.0 as usize))
+ (Ty::Array(Box::new(elem), len.0 as usize))
));
named!(ty_ptr -> Ty, do_parse!(
@@ -426,12 +426,12 @@
impl ToTokens for Ty {
fn to_tokens(&self, tokens: &mut Tokens) {
match *self {
- Ty::Vec(ref inner) => {
+ Ty::Slice(ref inner) => {
tokens.append("[");
inner.to_tokens(tokens);
tokens.append("]");
}
- Ty::FixedLengthVec(ref inner, len) => {
+ Ty::Array(ref inner, len) => {
tokens.append("[");
inner.to_tokens(tokens);
tokens.append(";");