diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-08 00:08:09 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-12 18:05:05 +0100 |
| commit | abf2e7aa959a4611bc2f607bc7e9200b8b81c089 (patch) | |
| tree | 74750f2a8b65450bc7b091921681ce63684da9ef /src/libsyntax_ext | |
| parent | 35e9e097e7c7e977f36795c0febceb327e1fa33f (diff) | |
| download | rust-abf2e7aa959a4611bc2f607bc7e9200b8b81c089.tar.gz rust-abf2e7aa959a4611bc2f607bc7e9200b8b81c089.zip | |
Remove `ast::{Impl,Trait}{Item,ItemKind}`.
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index d51fcf315a6..1c1fcc4f301 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -504,13 +504,13 @@ impl<'a> TraitDef<'a> { type_ident: Ident, generics: &Generics, field_tys: Vec<P<ast::Ty>>, - methods: Vec<ast::ImplItem>) + methods: Vec<ast::AssocItem>) -> P<ast::Item> { let trait_path = self.path.to_path(cx, self.span, type_ident, generics); - // Transform associated types from `deriving::ty::Ty` into `ast::ImplItem` + // Transform associated types from `deriving::ty::Ty` into `ast::AssocItem` let associated_types = self.associated_types.iter().map(|&(ident, ref type_def)| { - ast::ImplItem { + ast::AssocItem { id: ast::DUMMY_NODE_ID, span: self.span, ident, @@ -518,7 +518,7 @@ impl<'a> TraitDef<'a> { defaultness: ast::Defaultness::Final, attrs: Vec::new(), generics: Generics::default(), - kind: ast::ImplItemKind::TyAlias( + kind: ast::AssocItemKind::TyAlias( Vec::new(), Some(type_def.to_ty(cx, self.span, type_ident, generics)), ), @@ -912,7 +912,7 @@ impl<'a> MethodDef<'a> { explicit_self: Option<ast::ExplicitSelf>, arg_types: Vec<(Ident, P<ast::Ty>)>, body: P<Expr>) - -> ast::ImplItem { + -> ast::AssocItem { // Create the generics that aren't for `Self`. let fn_generics = self.generics.to_generics(cx, trait_.span, type_ident, generics); @@ -950,7 +950,7 @@ impl<'a> MethodDef<'a> { }; // Create the method. - ast::ImplItem { + ast::AssocItem { id: ast::DUMMY_NODE_ID, attrs: self.attributes.clone(), generics: fn_generics, @@ -958,7 +958,7 @@ impl<'a> MethodDef<'a> { vis: respan(trait_lo_sp, ast::VisibilityKind::Inherited), defaultness: ast::Defaultness::Final, ident: method_ident, - kind: ast::ImplItemKind::Method(sig, Some(body_block)), + kind: ast::AssocItemKind::Method(sig, Some(body_block)), tokens: None, } } |
