span_lint_and_note now takes an Option<Span> for the note_span instead of just a span

This commit is contained in:
Andy Weiss 2020-04-21 21:28:23 -07:00
parent d6e55e97ff
commit 8b052d3142
1 changed files with 1 additions and 1 deletions

View File

@ -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",
);
}