rename ast::ImplItem_::*ImplItem to ast::ImplItemKind::*

This commit is contained in:
Oliver Schneider
2015-11-13 14:15:04 +01:00
parent e36872da5b
commit d09220de13
12 changed files with 47 additions and 48 deletions

View File

@@ -480,7 +480,7 @@ impl<'a> TraitDef<'a> {
ident: ident,
vis: ast::Inherited,
attrs: Vec::new(),
node: ast::TypeImplItem(type_def.to_ty(cx,
node: ast::ImplItemKind::Type(type_def.to_ty(cx,
self.span,
type_ident,
generics
@@ -895,7 +895,7 @@ impl<'a> MethodDef<'a> {
span: trait_.span,
vis: ast::Inherited,
ident: method_ident,
node: ast::MethodImplItem(ast::MethodSig {
node: ast::ImplItemKind::Method(ast::MethodSig {
generics: fn_generics,
abi: abi,
explicit_self: explicit_self,

View File

@@ -1030,23 +1030,23 @@ fn expand_item_multi_modifier(mut it: Annotatable,
fn expand_impl_item(ii: P<ast::ImplItem>, fld: &mut MacroExpander)
-> SmallVector<P<ast::ImplItem>> {
match ii.node {
ast::MethodImplItem(..) => SmallVector::one(ii.map(|ii| ast::ImplItem {
ast::ImplItemKind::Method(..) => SmallVector::one(ii.map(|ii| ast::ImplItem {
id: ii.id,
ident: ii.ident,
attrs: ii.attrs,
vis: ii.vis,
node: match ii.node {
ast::MethodImplItem(sig, body) => {
ast::ImplItemKind::Method(sig, body) => {
let (sig, body) = expand_and_rename_method(sig, body, fld);
ast::MethodImplItem(sig, body)
ast::ImplItemKind::Method(sig, body)
}
_ => unreachable!()
},
span: fld.new_span(ii.span)
})),
ast::MacImplItem(_) => {
ast::ImplItemKind::Macro(_) => {
let (span, mac) = ii.and_then(|ii| match ii.node {
ast::MacImplItem(mac) => (ii.span, mac),
ast::ImplItemKind::Macro(mac) => (ii.span, mac),
_ => unreachable!()
});
let maybe_new_items =