diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-12-10 03:18:03 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2021-12-10 03:18:03 +0000 |
| commit | da5b0cc851535e1f4af667ab15254b2e8f85f3a3 (patch) | |
| tree | 39dfea7a0c1f7264bfa988557b36ae5b48d5feb0 | |
| parent | d33fa135fe1c03ee51a84f7c6bb03a53eb3e3eed (diff) | |
| download | rust-da5b0cc851535e1f4af667ab15254b2e8f85f3a3.tar.gz rust-da5b0cc851535e1f4af667ab15254b2e8f85f3a3.zip | |
review comment
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs index dab0b87f7ae..36d88029252 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs @@ -126,7 +126,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { lifetime, ); - let (mention_capture, capture_point) = if sup_origin.span().overlaps(param.param_ty_span) { + let (mention_influencer, influencer_point) = if sup_origin.span().overlaps(param.param_ty_span) { // Account for `async fn` like in `async-await/issues/issue-62097.rs`. // The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same // place (but with different `ctxt`, hence `overlaps` instead of `==` above). @@ -142,13 +142,13 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { } else { (!sup_origin.span().overlaps(return_sp), param.param_ty_span) }; - err.span_label(capture_point, &format!("this data with {}...", lifetime)); + err.span_label(influencer_point, &format!("this data with {}...", lifetime)); debug!("try_report_static_impl_trait: param_info={:?}", param); let mut spans = spans.clone(); - if mention_capture { + if mention_influencer { spans.push(sup_origin.span()); } // We dedup the spans *ignoring* expansion context. |
