@@ -225,10 +225,10 @@ pub struct Generics<Body: IsBody> {
225225}
226226
227227#[ cfg( feature = "rustc" ) ]
228- impl < ' tcx , S : UnderOwnerState < ' tcx > , Body : IsBody > SInto < S , ImplItem < Body > > for hir:: ImplItemRef {
228+ impl < ' tcx , S : UnderOwnerState < ' tcx > , Body : IsBody > SInto < S , ImplItem < Body > > for hir:: ImplItemId {
229229 fn sinto ( & self , s : & S ) -> ImplItem < Body > {
230230 let tcx: rustc_middle:: ty:: TyCtxt = s. base ( ) . tcx ;
231- let impl_item = tcx. hir_impl_item ( self . id ) ;
231+ let impl_item = tcx. hir_impl_item ( * self ) ;
232232 let s = with_owner_id ( s. base ( ) , ( ) , ( ) , impl_item. owner_id . to_def_id ( ) ) ;
233233 impl_item. sinto ( & s)
234234 }
@@ -393,17 +393,6 @@ pub enum ImplItemKind<Body: IsBody> {
393393 } ,
394394}
395395
396- /// Reflects [`hir::AssocItemKind`]
397- #[ derive( AdtInto ) ]
398- #[ args( <' tcx, S : UnderOwnerState <' tcx>>, from: hir:: AssocItemKind , state: S as tcx) ]
399- #[ derive_group( Serializers ) ]
400- #[ derive( Clone , Debug , JsonSchema ) ]
401- pub enum AssocItemKind {
402- Const ,
403- Fn { has_self : bool } ,
404- Type ,
405- }
406-
407396/// Reflects [`hir::Impl`].
408397#[ derive( AdtInto ) ]
409398#[ args( <' tcx, S : UnderOwnerState <' tcx> >, from: hir:: Impl <' tcx>, state: S as s) ]
@@ -674,6 +663,7 @@ pub enum ItemKind<Body: IsBody> {
674663 Struct ( Ident , Generics < Body > , VariantData ) ,
675664 Union ( Ident , Generics < Body > , VariantData ) ,
676665 Trait (
666+ Constness ,
677667 IsAuto ,
678668 Safety ,
679669 Ident ,
@@ -741,11 +731,11 @@ impl<'tcx, S: UnderOwnerState<'tcx>, Body: IsBody> SInto<S, EnumDef<Body>> for h
741731}
742732
743733#[ cfg( feature = "rustc" ) ]
744- impl < ' a , S : UnderOwnerState < ' a > , Body : IsBody > SInto < S , TraitItem < Body > > for hir:: TraitItemRef {
734+ impl < ' a , S : UnderOwnerState < ' a > , Body : IsBody > SInto < S , TraitItem < Body > > for hir:: TraitItemId {
745735 fn sinto ( & self , s : & S ) -> TraitItem < Body > {
746- let s = with_owner_id ( s. base ( ) , ( ) , ( ) , self . id . owner_id . to_def_id ( ) ) ;
736+ let s = with_owner_id ( s. base ( ) , ( ) , ( ) , self . owner_id . to_def_id ( ) ) ;
747737 let tcx: rustc_middle:: ty:: TyCtxt = s. base ( ) . tcx ;
748- tcx. hir_trait_item ( self . id ) . sinto ( & s)
738+ tcx. hir_trait_item ( * self ) . sinto ( & s)
749739 }
750740}
751741
@@ -785,10 +775,10 @@ pub struct ForeignItem<Body: IsBody> {
785775}
786776
787777#[ cfg( feature = "rustc" ) ]
788- impl < ' a , S : UnderOwnerState < ' a > , Body : IsBody > SInto < S , ForeignItem < Body > > for hir:: ForeignItemRef {
778+ impl < ' a , S : UnderOwnerState < ' a > , Body : IsBody > SInto < S , ForeignItem < Body > > for hir:: ForeignItemId {
789779 fn sinto ( & self , s : & S ) -> ForeignItem < Body > {
790780 let tcx: rustc_middle:: ty:: TyCtxt = s. base ( ) . tcx ;
791- tcx. hir_foreign_item ( self . id ) . sinto ( s)
781+ tcx. hir_foreign_item ( * self ) . sinto ( s)
792782 }
793783}
794784
@@ -925,7 +915,7 @@ impl<'tcx, S: BaseState<'tcx>, Body: IsBody> SInto<S, Item<Body>> for hir::Item<
925915 | Enum ( i, ..)
926916 | Struct ( i, ..)
927917 | Union ( i, ..)
928- | Trait ( _, _, i, ..)
918+ | Trait ( _, _, _ , i, ..)
929919 | TraitAlias ( i, ..) => i. name . to_ident_string ( ) ,
930920 Use ( ..) | ForeignMod { .. } | GlobalAsm { .. } | Impl { .. } => String :: new ( ) ,
931921 } ;
0 commit comments