We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a1315 commit e612f7aCopy full SHA for e612f7a
compiler/rustc_mir/src/borrow_check/diagnostics/explain_borrow.rs
@@ -119,7 +119,7 @@ impl BorrowExplanation {
119
let path_span = path_span.unwrap();
120
// path_span is only present in the case of closure capture
121
assert!(matches!(later_use_kind, LaterUseKind::ClosureCapture));
122
- if !borrow_span.map_or(false, |sp| sp.overlaps(var_or_use_span)) {
+ if borrow_span.map(|sp| !sp.overlaps(var_or_use_span)).unwrap_or(true) {
123
let path_label = "used here by closure";
124
let capture_kind_label = message;
125
err.span_label(
0 commit comments