@@ -126,22 +126,23 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
126126 lifetime,
127127 ) ;
128128
129- let ( mention_influencer, influencer_point) = if sup_origin. span ( ) . overlaps ( param. param_ty_span ) {
130- // Account for `async fn` like in `async-await/issues/issue-62097.rs`.
131- // The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same
132- // place (but with different `ctxt`, hence `overlaps` instead of `==` above).
133- //
134- // This avoids the following:
135- //
136- // LL | pub async fn run_dummy_fn(&self) {
137- // | ^^^^^
138- // | |
139- // | this data with an anonymous lifetime `'_`...
140- // | ...is captured here...
141- ( false , sup_origin. span ( ) )
142- } else {
143- ( !sup_origin. span ( ) . overlaps ( return_sp) , param. param_ty_span )
144- } ;
129+ let ( mention_influencer, influencer_point) =
130+ if sup_origin. span ( ) . overlaps ( param. param_ty_span ) {
131+ // Account for `async fn` like in `async-await/issues/issue-62097.rs`.
132+ // The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same
133+ // place (but with different `ctxt`, hence `overlaps` instead of `==` above).
134+ //
135+ // This avoids the following:
136+ //
137+ // LL | pub async fn run_dummy_fn(&self) {
138+ // | ^^^^^
139+ // | |
140+ // | this data with an anonymous lifetime `'_`...
141+ // | ...is captured here...
142+ ( false , sup_origin. span ( ) )
143+ } else {
144+ ( !sup_origin. span ( ) . overlaps ( return_sp) , param. param_ty_span )
145+ } ;
145146 err. span_label ( influencer_point, & format ! ( "this data with {}..." , lifetime) ) ;
146147
147148 debug ! ( "try_report_static_impl_trait: param_info={:?}" , param) ;
0 commit comments