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

@@ -341,13 +341,19 @@ fn public_methods(ms: ~[@method]) -> ~[@method] {
// a default, pull out the useful fields to make a ty_method
fn trait_method_to_ty_method(method: trait_method) -> ty_method {
match method {
required(ref m) => (*m),
provided(m) => {
{ident: m.ident, attrs: m.attrs,
purity: m.purity, decl: m.decl,
tps: m.tps, self_ty: m.self_ty,
id: m.id, span: m.span}
}
required(ref m) => (*m),
provided(m) => {
ty_method {
ident: m.ident,
attrs: m.attrs,
purity: m.purity,
decl: m.decl,
tps: m.tps,
self_ty: m.self_ty,
id: m.id,
span: m.span,
}
}
}
}