@@ -2252,9 +2252,9 @@ pub struct Mod {
22522252}
22532253
22542254#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2255- pub struct ForeignMod {
2255+ pub struct ForeignMod < ' hir > {
22562256 pub abi : Abi ,
2257- pub items : HirVec < ForeignItem > ,
2257+ pub items : & ' hir [ ForeignItem < ' hir > ] ,
22582258}
22592259
22602260#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
@@ -2491,7 +2491,7 @@ pub enum ItemKind<'hir> {
24912491 /// A module.
24922492 Mod ( Mod ) ,
24932493 /// An external module, e.g. `extern { .. }`.
2494- ForeignMod ( ForeignMod ) ,
2494+ ForeignMod ( ForeignMod < ' hir > ) ,
24952495 /// Module-level inline assembly (from `global_asm!`).
24962496 GlobalAsm ( & ' hir GlobalAsm ) ,
24972497 /// A type alias, e.g., `type Foo = Bar<u8>`.
@@ -2607,28 +2607,28 @@ pub enum AssocItemKind {
26072607}
26082608
26092609#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2610- pub struct ForeignItem {
2610+ pub struct ForeignItem < ' hir > {
26112611 #[ stable_hasher( project( name) ) ]
26122612 pub ident : Ident ,
2613- pub attrs : HirVec < Attribute > ,
2614- pub kind : ForeignItemKind ,
2613+ pub attrs : & ' hir [ Attribute ] ,
2614+ pub kind : ForeignItemKind < ' hir > ,
26152615 pub hir_id : HirId ,
26162616 pub span : Span ,
26172617 pub vis : Visibility ,
26182618}
26192619
26202620/// An item within an `extern` block.
26212621#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2622- pub enum ForeignItemKind {
2622+ pub enum ForeignItemKind < ' hir > {
26232623 /// A foreign function.
2624- Fn ( P < FnDecl > , HirVec < Ident > , Generics ) ,
2624+ Fn ( & ' hir FnDecl , & ' hir [ Ident ] , Generics ) ,
26252625 /// A foreign static item (`static ext: u8`).
2626- Static ( P < Ty > , Mutability ) ,
2626+ Static ( & ' hir Ty , Mutability ) ,
26272627 /// A foreign type.
26282628 Type ,
26292629}
26302630
2631- impl ForeignItemKind {
2631+ impl ForeignItemKind < ' hir > {
26322632 pub fn descriptive_variant ( & self ) -> & str {
26332633 match * self {
26342634 ForeignItemKind :: Fn ( ..) => "foreign function" ,
@@ -2788,7 +2788,7 @@ impl CodegenFnAttrs {
27882788pub enum Node < ' hir > {
27892789 Param ( & ' hir Param ) ,
27902790 Item ( & ' hir Item < ' hir > ) ,
2791- ForeignItem ( & ' hir ForeignItem ) ,
2791+ ForeignItem ( & ' hir ForeignItem < ' hir > ) ,
27922792 TraitItem ( & ' hir TraitItem ) ,
27932793 ImplItem ( & ' hir ImplItem ) ,
27942794 Variant ( & ' hir Variant ) ,
0 commit comments