@@ -2252,9 +2252,9 @@ pub struct Mod {
2252
2252
}
2253
2253
2254
2254
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2255
- pub struct ForeignMod {
2255
+ pub struct ForeignMod < ' hir > {
2256
2256
pub abi : Abi ,
2257
- pub items : HirVec < ForeignItem > ,
2257
+ pub items : & ' hir [ ForeignItem < ' hir > ] ,
2258
2258
}
2259
2259
2260
2260
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
@@ -2491,7 +2491,7 @@ pub enum ItemKind<'hir> {
2491
2491
/// A module.
2492
2492
Mod ( Mod ) ,
2493
2493
/// An external module, e.g. `extern { .. }`.
2494
- ForeignMod ( ForeignMod ) ,
2494
+ ForeignMod ( ForeignMod < ' hir > ) ,
2495
2495
/// Module-level inline assembly (from `global_asm!`).
2496
2496
GlobalAsm ( & ' hir GlobalAsm ) ,
2497
2497
/// A type alias, e.g., `type Foo = Bar<u8>`.
@@ -2607,28 +2607,28 @@ pub enum AssocItemKind {
2607
2607
}
2608
2608
2609
2609
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2610
- pub struct ForeignItem {
2610
+ pub struct ForeignItem < ' hir > {
2611
2611
#[ stable_hasher( project( name) ) ]
2612
2612
pub ident : Ident ,
2613
- pub attrs : HirVec < Attribute > ,
2614
- pub kind : ForeignItemKind ,
2613
+ pub attrs : & ' hir [ Attribute ] ,
2614
+ pub kind : ForeignItemKind < ' hir > ,
2615
2615
pub hir_id : HirId ,
2616
2616
pub span : Span ,
2617
2617
pub vis : Visibility ,
2618
2618
}
2619
2619
2620
2620
/// An item within an `extern` block.
2621
2621
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2622
- pub enum ForeignItemKind {
2622
+ pub enum ForeignItemKind < ' hir > {
2623
2623
/// A foreign function.
2624
- Fn ( P < FnDecl > , HirVec < Ident > , Generics ) ,
2624
+ Fn ( & ' hir FnDecl , & ' hir [ Ident ] , Generics ) ,
2625
2625
/// A foreign static item (`static ext: u8`).
2626
- Static ( P < Ty > , Mutability ) ,
2626
+ Static ( & ' hir Ty , Mutability ) ,
2627
2627
/// A foreign type.
2628
2628
Type ,
2629
2629
}
2630
2630
2631
- impl ForeignItemKind {
2631
+ impl ForeignItemKind < ' hir > {
2632
2632
pub fn descriptive_variant ( & self ) -> & str {
2633
2633
match * self {
2634
2634
ForeignItemKind :: Fn ( ..) => "foreign function" ,
@@ -2788,7 +2788,7 @@ impl CodegenFnAttrs {
2788
2788
pub enum Node < ' hir > {
2789
2789
Param ( & ' hir Param ) ,
2790
2790
Item ( & ' hir Item < ' hir > ) ,
2791
- ForeignItem ( & ' hir ForeignItem ) ,
2791
+ ForeignItem ( & ' hir ForeignItem < ' hir > ) ,
2792
2792
TraitItem ( & ' hir TraitItem ) ,
2793
2793
ImplItem ( & ' hir ImplItem ) ,
2794
2794
Variant ( & ' hir Variant ) ,
0 commit comments