Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
1000teslas 2021-01-16 03:32:54 +11:00 committed by GitHub
parent 5468d9805a
commit 3e9c95b9d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1331,9 +1331,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}
ConstraintCategory::CallArgument => {
fr_name.highlight_region_name(&mut err);
if matches!(use_span.generator_kind(), Some(generator_kind)
if matches!(generator_kind, GeneratorKind::Async(_)))
{
if matches!(use_span.generator_kind(), Some(GeneratorKind::Async(_))) {
err.note(
"async blocks are not executed immediately and must either take a \
reference or ownership of outside variables they use",