Skip to content

Commit da5b0cc

Browse files
committed
review comment
1 parent d33fa13 commit da5b0cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
126126
lifetime,
127127
);
128128

129-
let (mention_capture, capture_point) = if sup_origin.span().overlaps(param.param_ty_span) {
129+
let (mention_influencer, influencer_point) = if sup_origin.span().overlaps(param.param_ty_span) {
130130
// Account for `async fn` like in `async-await/issues/issue-62097.rs`.
131131
// The desugaring of `async `fn`s causes `sup_origin` and `param` to point at the same
132132
// place (but with different `ctxt`, hence `overlaps` instead of `==` above).
@@ -142,13 +142,13 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
142142
} else {
143143
(!sup_origin.span().overlaps(return_sp), param.param_ty_span)
144144
};
145-
err.span_label(capture_point, &format!("this data with {}...", lifetime));
145+
err.span_label(influencer_point, &format!("this data with {}...", lifetime));
146146

147147
debug!("try_report_static_impl_trait: param_info={:?}", param);
148148

149149
let mut spans = spans.clone();
150150

151-
if mention_capture {
151+
if mention_influencer {
152152
spans.push(sup_origin.span());
153153
}
154154
// We dedup the spans *ignoring* expansion context.

0 commit comments

Comments
 (0)