@@ -61,12 +61,12 @@ enum DisallowTildeConstContext<'a> {
61
61
Item ,
62
62
}
63
63
64
- enum TraitOrTraitImpl < ' a > {
64
+ enum TraitOrTraitImpl {
65
65
Trait { span : Span , constness : Option < Span > } ,
66
- TraitImpl { constness : Const , polarity : ImplPolarity , trait_ref : & ' a TraitRef } ,
66
+ TraitImpl { constness : Const , polarity : ImplPolarity , trait_ref : Span } ,
67
67
}
68
68
69
- impl < ' a > TraitOrTraitImpl < ' a > {
69
+ impl TraitOrTraitImpl {
70
70
fn constness ( & self ) -> Option < Span > {
71
71
match self {
72
72
Self :: Trait { constness : Some ( span) , .. }
@@ -83,7 +83,7 @@ struct AstValidator<'a> {
83
83
/// The span of the `extern` in an `extern { ... }` block, if any.
84
84
extern_mod : Option < Span > ,
85
85
86
- outer_trait_or_trait_impl : Option < TraitOrTraitImpl < ' a > > ,
86
+ outer_trait_or_trait_impl : Option < TraitOrTraitImpl > ,
87
87
88
88
has_proc_macro_decls : bool ,
89
89
@@ -115,7 +115,7 @@ impl<'a> AstValidator<'a> {
115
115
trait_. map ( |( constness, polarity, trait_ref) | TraitOrTraitImpl :: TraitImpl {
116
116
constness,
117
117
polarity,
118
- trait_ref,
118
+ trait_ref : trait_ref . path . span ,
119
119
} ) ,
120
120
) ;
121
121
f ( self ) ;
@@ -354,7 +354,7 @@ impl<'a> AstValidator<'a> {
354
354
}
355
355
}
356
356
357
- fn check_trait_fn_not_const ( & self , constness : Const , parent : & TraitOrTraitImpl < ' a > ) {
357
+ fn check_trait_fn_not_const ( & self , constness : Const , parent : & TraitOrTraitImpl ) {
358
358
let Const :: Yes ( span) = constness else {
359
359
return ;
360
360
} ;
@@ -367,7 +367,7 @@ impl<'a> AstValidator<'a> {
367
367
..
368
368
} = parent
369
369
{
370
- Some ( trait_ref. path . span . shrink_to_lo ( ) )
370
+ Some ( trait_ref. shrink_to_lo ( ) )
371
371
} else {
372
372
None
373
373
} ;
0 commit comments