@@ -759,7 +759,7 @@ pub struct Crate<'hir> {
759
759
pub items : BTreeMap < HirId , Item < ' hir > > ,
760
760
761
761
pub trait_items : BTreeMap < TraitItemId , TraitItem < ' hir > > ,
762
- pub impl_items : BTreeMap < ImplItemId , ImplItem > ,
762
+ pub impl_items : BTreeMap < ImplItemId , ImplItem < ' hir > > ,
763
763
pub bodies : BTreeMap < BodyId , Body > ,
764
764
pub trait_impls : BTreeMap < DefId , Vec < HirId > > ,
765
765
@@ -783,7 +783,7 @@ impl Crate<'hir> {
783
783
& self . trait_items [ & id]
784
784
}
785
785
786
- pub fn impl_item ( & self , id : ImplItemId ) -> & ImplItem {
786
+ pub fn impl_item ( & self , id : ImplItemId ) -> & ImplItem < ' hir > {
787
787
& self . impl_items [ & id]
788
788
}
789
789
@@ -1938,27 +1938,27 @@ pub struct ImplItemId {
1938
1938
1939
1939
/// Represents anything within an `impl` block.
1940
1940
#[ derive( RustcEncodable , RustcDecodable , Debug ) ]
1941
- pub struct ImplItem {
1941
+ pub struct ImplItem < ' hir > {
1942
1942
pub ident : Ident ,
1943
1943
pub hir_id : HirId ,
1944
1944
pub vis : Visibility ,
1945
1945
pub defaultness : Defaultness ,
1946
- pub attrs : HirVec < Attribute > ,
1946
+ pub attrs : & ' hir [ Attribute ] ,
1947
1947
pub generics : Generics ,
1948
- pub kind : ImplItemKind ,
1948
+ pub kind : ImplItemKind < ' hir > ,
1949
1949
pub span : Span ,
1950
1950
}
1951
1951
1952
1952
/// Represents various kinds of content within an `impl`.
1953
1953
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
1954
- pub enum ImplItemKind {
1954
+ pub enum ImplItemKind < ' hir > {
1955
1955
/// An associated constant of the given type, set to the constant result
1956
1956
/// of the expression.
1957
- Const ( P < Ty > , BodyId ) ,
1957
+ Const ( & ' hir Ty , BodyId ) ,
1958
1958
/// A method implementation with the given signature and body.
1959
1959
Method ( FnSig , BodyId ) ,
1960
1960
/// An associated type.
1961
- TyAlias ( P < Ty > ) ,
1961
+ TyAlias ( & ' hir Ty ) ,
1962
1962
/// An associated `type = impl Trait`.
1963
1963
OpaqueTy ( GenericBounds ) ,
1964
1964
}
@@ -2790,7 +2790,7 @@ pub enum Node<'hir> {
2790
2790
Item ( & ' hir Item < ' hir > ) ,
2791
2791
ForeignItem ( & ' hir ForeignItem < ' hir > ) ,
2792
2792
TraitItem ( & ' hir TraitItem < ' hir > ) ,
2793
- ImplItem ( & ' hir ImplItem ) ,
2793
+ ImplItem ( & ' hir ImplItem < ' hir > ) ,
2794
2794
Variant ( & ' hir Variant ) ,
2795
2795
Field ( & ' hir StructField ) ,
2796
2796
AnonConst ( & ' hir AnonConst ) ,
0 commit comments