Only regular coroutines have movability
This commit is contained in:
parent
909dd864f1
commit
3320c09eab
25 changed files with 130 additions and 104 deletions
|
@ -90,13 +90,10 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
|
|||
}) => {
|
||||
// FIXME(coroutines): This doesn't handle coroutines correctly
|
||||
let cx = match kind {
|
||||
hir::ClosureKind::Coroutine(
|
||||
hir::CoroutineKind::Desugared(
|
||||
hir::CoroutineDesugaring::Async,
|
||||
hir::CoroutineSource::Block,
|
||||
),
|
||||
_,
|
||||
) => AsyncClosure(fn_decl_span),
|
||||
hir::ClosureKind::Coroutine(hir::CoroutineKind::Desugared(
|
||||
hir::CoroutineDesugaring::Async,
|
||||
hir::CoroutineSource::Block,
|
||||
)) => AsyncClosure(fn_decl_span),
|
||||
_ => Closure(fn_decl_span),
|
||||
};
|
||||
self.visit_fn_decl(fn_decl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue