Skip to content

Commit 8b052d3

Browse files
committed
span_lint_and_note now takes an Option<Span> for the note_span instead of just a span
1 parent d6e55e9 commit 8b052d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/await_holding_lock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn check_interior_types(cx: &LateContext<'_, '_>, ty_causes: &[GeneratorInterior
7979
AWAIT_HOLDING_LOCK,
8080
ty_cause.span,
8181
"this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.",
82-
ty_cause.scope_span.unwrap_or(span),
82+
ty_cause.scope_span.or(Some(span)),
8383
"these are all the await points this lock is held through",
8484
);
8585
}

0 commit comments

Comments
 (0)