Skip to content

Commit

Permalink
Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_error…
Browse files Browse the repository at this point in the history
…s.rs

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
  • Loading branch information
sledgehammervampire and estebank authored Jan 15, 2021
1 parent 5468d98 commit 3e9c95b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3e9c95b

Please sign in to comment.