Skip to content

Commit

Permalink
span_lint_and_note now takes an Option<Span> for the note_span instea…
Browse files Browse the repository at this point in the history
…d of just a span
  • Loading branch information
rokob committed Apr 22, 2020
1 parent d6e55e9 commit 8b052d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/await_holding_lock.rs
Expand Up @@ -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",
);
}
Expand Down

0 comments on commit 8b052d3

Please sign in to comment.