diff options
| author | 1000teslas <47207223+1000teslas@users.noreply.github.com> | 2021-01-16 03:32:54 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-16 03:32:54 +1100 |
| commit | 3e9c95b9d44aba57ee70a596b73af514046b4b26 (patch) | |
| tree | 8c1d186f0ede421fb737c2f63e5a87578869adf6 | |
| parent | 5468d9805aba869e7712b5aadabb021e692ba1d0 (diff) | |
| download | rust-3e9c95b9d44aba57ee70a596b73af514046b4b26.tar.gz rust-3e9c95b9d44aba57ee70a596b73af514046b4b26.zip | |
Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
| -rw-r--r-- | compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs | 4 |
1 files changed, 1 insertions, 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 fb817d3ca1e..9325f94393f 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", |
