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 => {
|
ConstraintCategory::CallArgument => {
|
||||||
fr_name.highlight_region_name(&mut err);
|
fr_name.highlight_region_name(&mut err);
|
||||||
if matches!(use_span.generator_kind(), Some(generator_kind)
|
if matches!(use_span.generator_kind(), Some(GeneratorKind::Async(_))) {
|
||||||
if matches!(generator_kind, GeneratorKind::Async(_)))
|
|
||||||
{
|
|
||||||
err.note(
|
err.note(
|
||||||
"async blocks are not executed immediately and must either take a \
|
"async blocks are not executed immediately and must either take a \
|
||||||
reference or ownership of outside variables they use",
|
reference or ownership of outside variables they use",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue