@@ -225,10 +225,10 @@ pub struct Generics<Body: IsBody> {
225
225
}
226
226
227
227
#[ 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 {
229
229
fn sinto ( & self , s : & S ) -> ImplItem < Body > {
230
230
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 ) ;
232
232
let s = with_owner_id ( s. base ( ) , ( ) , ( ) , impl_item. owner_id . to_def_id ( ) ) ;
233
233
impl_item. sinto ( & s)
234
234
}
@@ -393,17 +393,6 @@ pub enum ImplItemKind<Body: IsBody> {
393
393
} ,
394
394
}
395
395
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
-
407
396
/// Reflects [`hir::Impl`].
408
397
#[ derive( AdtInto ) ]
409
398
#[ args( <' tcx, S : UnderOwnerState <' tcx> >, from: hir:: Impl <' tcx>, state: S as s) ]
@@ -674,6 +663,7 @@ pub enum ItemKind<Body: IsBody> {
674
663
Struct ( Ident , Generics < Body > , VariantData ) ,
675
664
Union ( Ident , Generics < Body > , VariantData ) ,
676
665
Trait (
666
+ Constness ,
677
667
IsAuto ,
678
668
Safety ,
679
669
Ident ,
@@ -741,11 +731,11 @@ impl<'tcx, S: UnderOwnerState<'tcx>, Body: IsBody> SInto<S, EnumDef<Body>> for h
741
731
}
742
732
743
733
#[ 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 {
745
735
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 ( ) ) ;
747
737
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)
749
739
}
750
740
}
751
741
@@ -785,10 +775,10 @@ pub struct ForeignItem<Body: IsBody> {
785
775
}
786
776
787
777
#[ 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 {
789
779
fn sinto ( & self , s : & S ) -> ForeignItem < Body > {
790
780
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)
792
782
}
793
783
}
794
784
@@ -925,7 +915,7 @@ impl<'tcx, S: BaseState<'tcx>, Body: IsBody> SInto<S, Item<Body>> for hir::Item<
925
915
| Enum ( i, ..)
926
916
| Struct ( i, ..)
927
917
| Union ( i, ..)
928
- | Trait ( _, _, i, ..)
918
+ | Trait ( _, _, _ , i, ..)
929
919
| TraitAlias ( i, ..) => i. name . to_ident_string ( ) ,
930
920
Use ( ..) | ForeignMod { .. } | GlobalAsm { .. } | Impl { .. } => String :: new ( ) ,
931
921
} ;
0 commit comments