@@ -2377,17 +2377,17 @@ impl VisibilityKind {
23772377}
23782378
23792379#[ derive( RustcEncodable , RustcDecodable , Debug , HashStable ) ]
2380- pub struct StructField {
2380+ pub struct StructField < ' hir > {
23812381 pub span : Span ,
23822382 #[ stable_hasher( project( name) ) ]
23832383 pub ident : Ident ,
23842384 pub vis : Visibility ,
23852385 pub hir_id : HirId ,
2386- pub ty : P < Ty > ,
2387- pub attrs : HirVec < Attribute > ,
2386+ pub ty : & ' hir Ty ,
2387+ pub attrs : & ' hir [ Attribute ] ,
23882388}
23892389
2390- impl StructField {
2390+ impl StructField < ' _ > {
23912391 // Still necessary in couple of places
23922392 pub fn is_positional ( & self ) -> bool {
23932393 let first = self . ident . as_str ( ) . as_bytes ( ) [ 0 ] ;
@@ -2401,11 +2401,11 @@ pub enum VariantData<'hir> {
24012401 /// A struct variant.
24022402 ///
24032403 /// E.g., `Bar { .. }` as in `enum Foo { Bar { .. } }`.
2404- Struct ( & ' hir [ StructField ] , /* recovered */ bool ) ,
2404+ Struct ( & ' hir [ StructField < ' hir > ] , /* recovered */ bool ) ,
24052405 /// A tuple variant.
24062406 ///
24072407 /// E.g., `Bar(..)` as in `enum Foo { Bar(..) }`.
2408- Tuple ( & ' hir [ StructField ] , HirId ) ,
2408+ Tuple ( & ' hir [ StructField < ' hir > ] , HirId ) ,
24092409 /// A unit variant.
24102410 ///
24112411 /// E.g., `Bar = ..` as in `enum Foo { Bar = .. }`.
@@ -2414,7 +2414,7 @@ pub enum VariantData<'hir> {
24142414
24152415impl VariantData < ' hir > {
24162416 /// Return the fields of this variant.
2417- pub fn fields ( & self ) -> & ' hir [ StructField ] {
2417+ pub fn fields ( & self ) -> & ' hir [ StructField < ' hir > ] {
24182418 match * self {
24192419 VariantData :: Struct ( ref fields, ..) | VariantData :: Tuple ( ref fields, ..) => fields,
24202420 _ => & [ ] ,
@@ -2792,7 +2792,7 @@ pub enum Node<'hir> {
27922792 TraitItem ( & ' hir TraitItem < ' hir > ) ,
27932793 ImplItem ( & ' hir ImplItem < ' hir > ) ,
27942794 Variant ( & ' hir Variant < ' hir > ) ,
2795- Field ( & ' hir StructField ) ,
2795+ Field ( & ' hir StructField < ' hir > ) ,
27962796 AnonConst ( & ' hir AnonConst ) ,
27972797 Expr ( & ' hir Expr ) ,
27982798 Stmt ( & ' hir Stmt ) ,
0 commit comments