diff options
| author | Andy Weiss <dragonbear@google.com> | 2020-04-21 21:28:23 -0700 |
|---|---|---|
| committer | Andy Weiss <dragonbear@google.com> | 2020-04-21 21:28:23 -0700 |
| commit | 8b052d3142fe3e335c676981c58235328268805e (patch) | |
| tree | bffcdb995d64f861ec97f92a948cf0e2a0c76827 | |
| parent | d6e55e97ff7060a2d752ff2413211adc7f8f4469 (diff) | |
| download | rust-8b052d3142fe3e335c676981c58235328268805e.tar.gz rust-8b052d3142fe3e335c676981c58235328268805e.zip | |
span_lint_and_note now takes an Option<Span> for the note_span instead of just a span
| -rw-r--r-- | clippy_lints/src/await_holding_lock.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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", ); } |
