From 8b052d3142fe3e335c676981c58235328268805e Mon Sep 17 00:00:00 2001 From: Andy Weiss Date: Tue, 21 Apr 2020 21:28:23 -0700 Subject: [PATCH] span_lint_and_note now takes an Option for the note_span instead of just a span --- clippy_lints/src/await_holding_lock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/await_holding_lock.rs b/clippy_lints/src/await_holding_lock.rs index b2aa3437923..832910763e6 100644 --- a/clippy_lints/src/await_holding_lock.rs +++ b/clippy_lints/src/await_holding_lock.rs @@ -79,7 +79,7 @@ fn check_interior_types(cx: &LateContext<'_, '_>, ty_causes: &[GeneratorInterior AWAIT_HOLDING_LOCK, ty_cause.span, "this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await.", - ty_cause.scope_span.unwrap_or(span), + ty_cause.scope_span.or(Some(span)), "these are all the await points this lock is held through", ); }