Split coroutine desugaring kind from source

This commit is contained in:
Michael Goulet 2023-12-21 18:49:20 +00:00
parent d6d7a93866
commit 004450506e
30 changed files with 448 additions and 239 deletions

View file

@ -1049,7 +1049,10 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
..
}) => {
let body = map.body(*body);
if !matches!(body.coroutine_kind, Some(hir::CoroutineKind::Async(..))) {
if !matches!(
body.coroutine_kind,
Some(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Async, _))
) {
closure_span = Some(expr.span.shrink_to_lo());
}
}