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:
parent
5468d9805a
commit
3e9c95b9d4
1 changed files with 1 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue