From 3e9c95b9d44aba57ee70a596b73af514046b4b26 Mon Sep 17 00:00:00 2001 From: 1000teslas <47207223+1000teslas@users.noreply.github.com> Date: Sat, 16 Jan 2021 03:32:54 +1100 Subject: [PATCH] Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs Co-authored-by: Esteban Kuber --- .../rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs b/compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs index fb817d3ca1e7..9325f94393ff 100644 --- a/compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs +++ b/compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs @@ -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",