Skip to content

Commit 16709ba

Browse files
committed
Renames to match rust-lang/rust#36599
1 parent d73dba2 commit 16709ba

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/expr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ pub enum Pat {
277277
/// A range pattern, e.g. `1...2`
278278
Range(Box<Lit>, Box<Lit>),
279279
/// `[a, b, ..i, y, z]` is represented as:
280-
/// `Pat::Vec(box [a, b], Some(i), box [y, z])`
281-
Vec(Vec<Pat>, Option<Box<Pat>>, Vec<Pat>),
280+
/// `Pat::Slice(box [a, b], Some(i), box [y, z])`
281+
Slice(Vec<Pat>, Option<Box<Pat>>, Vec<Pat>),
282282
/// A macro pattern; pre-expansion
283283
Mac(Mac),
284284
}
@@ -1496,7 +1496,7 @@ mod printing {
14961496
tokens.append("...");
14971497
hi.to_tokens(tokens);
14981498
}
1499-
Pat::Vec(ref _before, ref _dots, ref _after) => unimplemented!(),
1499+
Pat::Slice(ref _before, ref _dots, ref _after) => unimplemented!(),
15001500
Pat::Mac(ref mac) => mac.to_tokens(tokens),
15011501
}
15021502
}

src/ty.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use super::*;
44
#[derive(Debug, Clone, Eq, PartialEq)]
55
pub enum Ty {
66
/// A variable-length array (`[T]`)
7-
Vec(Box<Ty>),
7+
Slice(Box<Ty>),
88
/// A fixed length array (`[T; n]`)
9-
FixedLengthVec(Box<Ty>, usize),
9+
Array(Box<Ty>, usize),
1010
/// A raw pointer (`*const T` or `*mut T`)
1111
Ptr(Box<MutTy>),
1212
/// A reference (`&'a T` or `&'a mut T`)
@@ -226,7 +226,7 @@ pub mod parsing {
226226
punct!("[") >>
227227
elem: ty >>
228228
punct!("]") >>
229-
(Ty::Vec(Box::new(elem)))
229+
(Ty::Slice(Box::new(elem)))
230230
));
231231

232232
named!(ty_fixed_length_vec -> Ty, do_parse!(
@@ -235,7 +235,7 @@ pub mod parsing {
235235
punct!(";") >>
236236
len: int >>
237237
punct!("]") >>
238-
(Ty::FixedLengthVec(Box::new(elem), len.0 as usize))
238+
(Ty::Array(Box::new(elem), len.0 as usize))
239239
));
240240

241241
named!(ty_ptr -> Ty, do_parse!(
@@ -426,12 +426,12 @@ mod printing {
426426
impl ToTokens for Ty {
427427
fn to_tokens(&self, tokens: &mut Tokens) {
428428
match *self {
429-
Ty::Vec(ref inner) => {
429+
Ty::Slice(ref inner) => {
430430
tokens.append("[");
431431
inner.to_tokens(tokens);
432432
tokens.append("]");
433433
}
434-
Ty::FixedLengthVec(ref inner, len) => {
434+
Ty::Array(ref inner, len) => {
435435
tokens.append("[");
436436
inner.to_tokens(tokens);
437437
tokens.append(";");

0 commit comments

Comments
 (0)