@@ -759,7 +759,7 @@ pub struct Crate<'hir> {
759759 pub items : BTreeMap < HirId , Item < ' hir > > ,
760760
761761 pub trait_items : BTreeMap < TraitItemId , TraitItem < ' hir > > ,
762- pub impl_items : BTreeMap < ImplItemId , ImplItem > ,
762+ pub impl_items : BTreeMap < ImplItemId , ImplItem < ' hir > > ,
763763 pub bodies : BTreeMap < BodyId , Body > ,
764764 pub trait_impls : BTreeMap < DefId , Vec < HirId > > ,
765765
@@ -783,7 +783,7 @@ impl Crate<'hir> {
783783 & self . trait_items [ & id]
784784 }
785785
786- pub fn impl_item ( & self , id : ImplItemId ) -> & ImplItem {
786+ pub fn impl_item ( & self , id : ImplItemId ) -> & ImplItem < ' hir > {
787787 & self . impl_items [ & id]
788788 }
789789
@@ -1938,27 +1938,27 @@ pub struct ImplItemId {
19381938
19391939/// Represents anything within an `impl` block.
19401940#[ derive( RustcEncodable , RustcDecodable , Debug ) ]
1941- pub struct ImplItem {
1941+ pub struct ImplItem < ' hir > {
19421942 pub ident : Ident ,
19431943 pub hir_id : HirId ,
19441944 pub vis : Visibility ,
19451945 pub defaultness : Defaultness ,
1946- pub attrs : HirVec < Attribute > ,
1946+ pub attrs : & ' hir [ Attribute ] ,
19471947 pub generics : Generics ,
1948- pub kind : ImplItemKind ,
1948+ pub kind : ImplItemKind < ' hir > ,
19491949 pub span : Span ,
19501950}
19511951
19521952/// Represents various kinds of content within an `impl`.
19531953#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
1954- pub enum ImplItemKind {
1954+ pub enum ImplItemKind < ' hir > {
19551955 /// An associated constant of the given type, set to the constant result
19561956 /// of the expression.
1957- Const ( P < Ty > , BodyId ) ,
1957+ Const ( & ' hir Ty , BodyId ) ,
19581958 /// A method implementation with the given signature and body.
19591959 Method ( FnSig , BodyId ) ,
19601960 /// An associated type.
1961- TyAlias ( P < Ty > ) ,
1961+ TyAlias ( & ' hir Ty ) ,
19621962 /// An associated `type = impl Trait`.
19631963 OpaqueTy ( GenericBounds ) ,
19641964}
@@ -2790,7 +2790,7 @@ pub enum Node<'hir> {
27902790 Item ( & ' hir Item < ' hir > ) ,
27912791 ForeignItem ( & ' hir ForeignItem < ' hir > ) ,
27922792 TraitItem ( & ' hir TraitItem < ' hir > ) ,
2793- ImplItem ( & ' hir ImplItem ) ,
2793+ ImplItem ( & ' hir ImplItem < ' hir > ) ,
27942794 Variant ( & ' hir Variant ) ,
27952795 Field ( & ' hir StructField ) ,
27962796 AnonConst ( & ' hir AnonConst ) ,
0 commit comments