Use resizable Vec instead of P<[T]> in AST

This commit is contained in:
Vadim Petrochenkov
2017-01-17 01:54:59 +03:00
parent 2efe865d22
commit 03620dba25
9 changed files with 38 additions and 57 deletions

View File

@@ -225,7 +225,7 @@ pub trait Folder : Sized {
noop_fold_ty_param(tp, self)
}
fn fold_ty_params(&mut self, tps: P<[TyParam]>) -> P<[TyParam]> {
fn fold_ty_params(&mut self, tps: Vec<TyParam>) -> Vec<TyParam> {
noop_fold_ty_params(tps, self)
}
@@ -674,8 +674,7 @@ pub fn noop_fold_ty_param<T: Folder>(tp: TyParam, fld: &mut T) -> TyParam {
}
}
pub fn noop_fold_ty_params<T: Folder>(tps: P<[TyParam]>, fld: &mut T)
-> P<[TyParam]> {
pub fn noop_fold_ty_params<T: Folder>(tps: Vec<TyParam>, fld: &mut T) -> Vec<TyParam> {
tps.move_map(|tp| fld.fold_ty_param(tp))
}