1
Fork 0

convert ast::{ty_field_,ty_method} into a struct

This commit is contained in:
Erick Tryzelaar 2013-01-15 15:03:49 -08:00 committed by Tim Chevalier
parent 8cdc3fda11
commit 5ba7e55a4c
5 changed files with 47 additions and 21 deletions

View file

@ -541,9 +541,13 @@ fn noop_fold_ty(t: ty_, fld: ast_fold) -> ty_ {
mt { ty: fld.fold_ty(mt.ty), mutbl: mt.mutbl }
}
fn fold_field(f: ty_field, fld: ast_fold) -> ty_field {
spanned { node: { ident: fld.fold_ident(f.node.ident),
mt: fold_mt(f.node.mt, fld) },
span: fld.new_span(f.span) }
spanned {
node: ast::ty_field_ {
ident: fld.fold_ident(f.node.ident),
mt: fold_mt(f.node.mt, fld),
},
span: fld.new_span(f.span),
}
}
match t {
ty_nil | ty_bot | ty_infer => copy t,