X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_borrowck%2Fsrc%2Fdiagnostics%2Fmod.rs;h=cbd590052008c14a46f3ab0b099ea517ef6f7ce9;hb=b8d71fc41fe3476da0e4857294583eff271aa625;hp=1e51ab14f25eff700b52448772ddf9819c616ab8;hpb=063b1675b2ed27948a7821af639a28c1a669d868;p=rust.git diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index 1e51ab14f25..cbd59005200 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1059,12 +1059,7 @@ fn explain_captures( ); if self.fn_self_span_reported.insert(fn_span) { err.span_note( - // Check whether the source is accessible - if self.infcx.tcx.sess.source_map().is_span_accessible(self_arg.span) { - self_arg.span - } else { - fn_call_span - }, + self_arg.span, "calling this operator moves the left-hand side", ); }