@@ -4161,7 +4161,7 @@ impl<'hir> Item<'hir> {
41614161 Ident ,
41624162 & ' hir Generics <' hir>,
41634163 GenericBounds <' hir>,
4164- & ' hir [ TraitItemRef ]
4164+ & ' hir [ TraitItemId ]
41654165 ) ,
41664166 ItemKind :: Trait ( is_auto, safety, ident, generics, bounds, items) ,
41674167 ( * is_auto, * safety, * ident, generics, bounds, items) ;
@@ -4334,7 +4334,7 @@ pub enum ItemKind<'hir> {
43344334 /// A union definition, e.g., `union Foo<A, B> {x: A, y: B}`.
43354335 Union ( Ident , & ' hir Generics < ' hir > , VariantData < ' hir > ) ,
43364336 /// A trait definition.
4337- Trait ( IsAuto , Safety , Ident , & ' hir Generics < ' hir > , GenericBounds < ' hir > , & ' hir [ TraitItemRef ] ) ,
4337+ Trait ( IsAuto , Safety , Ident , & ' hir Generics < ' hir > , GenericBounds < ' hir > , & ' hir [ TraitItemId ] ) ,
43384338 /// A trait alias.
43394339 TraitAlias ( Ident , & ' hir Generics < ' hir > , GenericBounds < ' hir > ) ,
43404340
@@ -4361,7 +4361,7 @@ pub struct Impl<'hir> {
43614361 pub of_trait : Option < TraitRef < ' hir > > ,
43624362
43634363 pub self_ty : & ' hir Ty < ' hir > ,
4364- pub items : & ' hir [ ImplItemRef ] ,
4364+ pub items : & ' hir [ ImplItemId ] ,
43654365}
43664366
43674367impl ItemKind < ' _ > {
@@ -4425,32 +4425,6 @@ impl ItemKind<'_> {
44254425 }
44264426}
44274427
4428- /// A reference from an trait to one of its associated items. This
4429- /// contains the item's id, naturally, but also the item's name and
4430- /// some other high-level details (like whether it is an associated
4431- /// type or method, and whether it is public). This allows other
4432- /// passes to find the impl they want without loading the ID (which
4433- /// means fewer edges in the incremental compilation graph).
4434- #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
4435- pub struct TraitItemRef {
4436- pub id : TraitItemId ,
4437- pub ident : Ident ,
4438- pub span : Span ,
4439- }
4440-
4441- /// A reference from an impl to one of its associated items. This
4442- /// contains the item's ID, naturally, but also the item's name and
4443- /// some other high-level details (like whether it is an associated
4444- /// type or method, and whether it is public). This allows other
4445- /// passes to find the impl they want without loading the ID (which
4446- /// means fewer edges in the incremental compilation graph).
4447- #[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
4448- pub struct ImplItemRef {
4449- pub id : ImplItemId ,
4450- pub ident : Ident ,
4451- pub span : Span ,
4452- }
4453-
44544428// The bodies for items are stored "out of line", in a separate
44554429// hashmap in the `Crate`. Here we just record the hir-id of the item
44564430// so it can fetched later.
0 commit comments