@@ -2377,17 +2377,17 @@ impl VisibilityKind {
2377
2377
}
2378
2378
2379
2379
#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2380
- pub struct StructField {
2380
+ pub struct StructField < ' hir > {
2381
2381
pub span : Span ,
2382
2382
#[ stable_hasher( project( name) ) ]
2383
2383
pub ident : Ident ,
2384
2384
pub vis : Visibility ,
2385
2385
pub hir_id : HirId ,
2386
- pub ty : P < Ty > ,
2387
- pub attrs : HirVec < Attribute > ,
2386
+ pub ty : & ' hir Ty ,
2387
+ pub attrs : & ' hir [ Attribute ] ,
2388
2388
}
2389
2389
2390
- impl StructField {
2390
+ impl StructField < ' _ > {
2391
2391
// Still necessary in couple of places
2392
2392
pub fn is_positional ( & self ) -> bool {
2393
2393
let first = self . ident . as_str ( ) . as_bytes ( ) [ 0 ] ;
@@ -2401,11 +2401,11 @@ pub enum VariantData<'hir> {
2401
2401
/// A struct variant.
2402
2402
///
2403
2403
/// E.g., `Bar { .. }` as in `enum Foo { Bar { .. } }`.
2404
- Struct ( & ' hir [ StructField ] , /* recovered */ bool ) ,
2404
+ Struct ( & ' hir [ StructField < ' hir > ] , /* recovered */ bool ) ,
2405
2405
/// A tuple variant.
2406
2406
///
2407
2407
/// E.g., `Bar(..)` as in `enum Foo { Bar(..) }`.
2408
- Tuple ( & ' hir [ StructField ] , HirId ) ,
2408
+ Tuple ( & ' hir [ StructField < ' hir > ] , HirId ) ,
2409
2409
/// A unit variant.
2410
2410
///
2411
2411
/// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`.
@@ -2414,7 +2414,7 @@ pub enum VariantData<'hir> {
2414
2414
2415
2415
impl VariantData < ' hir > {
2416
2416
/// Return the fields of this variant.
2417
- pub fn fields ( & self ) -> & ' hir [ StructField ] {
2417
+ pub fn fields ( & self ) -> & ' hir [ StructField < ' hir > ] {
2418
2418
match * self {
2419
2419
VariantData :: Struct ( ref fields, ..) | VariantData :: Tuple ( ref fields, ..) => fields,
2420
2420
_ => & [ ] ,
@@ -2792,7 +2792,7 @@ pub enum Node<'hir> {
2792
2792
TraitItem ( & ' hir TraitItem < ' hir > ) ,
2793
2793
ImplItem ( & ' hir ImplItem < ' hir > ) ,
2794
2794
Variant ( & ' hir Variant < ' hir > ) ,
2795
- Field ( & ' hir StructField ) ,
2795
+ Field ( & ' hir StructField < ' hir > ) ,
2796
2796
AnonConst ( & ' hir AnonConst ) ,
2797
2797
Expr ( & ' hir Expr ) ,
2798
2798
Stmt ( & ' hir Stmt ) ,
0 commit comments