1
Fork 0

Make some matches exhaustive to avoid bugs, fix tools

This commit is contained in:
Michael Goulet 2023-12-05 21:53:18 +00:00
parent a208bae00e
commit 44911b7c67
8 changed files with 71 additions and 45 deletions

View file

@ -1035,6 +1035,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let (Some(coroutine_kind), Some(body)) = (coroutine_kind, body) else {
return self.lower_fn_body_block(span, decl, body);
};
// FIXME(gen_blocks): Introduce `closure_id` method and remove ALL destructuring.
let (CoroutineKind::Async { closure_id, .. }
| CoroutineKind::Gen { closure_id, .. }
| CoroutineKind::AsyncGen { closure_id, .. }) = coroutine_kind;