review comment
This commit is contained in:
parent
d33fa135fe
commit
da5b0cc851
1 changed files with 3 additions and 3 deletions
|
@ -126,7 +126,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||||
lifetime,
|
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`.
|
// 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
|
// 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).
|
// place (but with different `ctxt`, hence `overlaps` instead of `==` above).
|
||||||
|
@ -142,13 +142,13 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||||
} else {
|
} else {
|
||||||
(!sup_origin.span().overlaps(return_sp), param.param_ty_span)
|
(!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);
|
debug!("try_report_static_impl_trait: param_info={:?}", param);
|
||||||
|
|
||||||
let mut spans = spans.clone();
|
let mut spans = spans.clone();
|
||||||
|
|
||||||
if mention_capture {
|
if mention_influencer {
|
||||||
spans.push(sup_origin.span());
|
spans.push(sup_origin.span());
|
||||||
}
|
}
|
||||||
// We dedup the spans *ignoring* expansion context.
|
// We dedup the spans *ignoring* expansion context.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue