More comments, final tweaks

This commit is contained in:
Michael Goulet 2024-01-25 19:17:21 +00:00
parent 37184e86ea
commit c98d6994a3
20 changed files with 169 additions and 42 deletions

View file

@ -1533,15 +1533,8 @@ fn coroutine_kind(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<hir::CoroutineK
}
fn coroutine_for_closure(tcx: TyCtxt<'_>, def_id: LocalDefId) -> DefId {
let Node::Expr(&hir::Expr {
kind:
hir::ExprKind::Closure(&rustc_hir::Closure {
kind: hir::ClosureKind::CoroutineClosure(_),
body,
..
}),
..
}) = tcx.hir_node_by_def_id(def_id)
let &rustc_hir::Closure { kind: hir::ClosureKind::CoroutineClosure(_), body, .. } =
tcx.hir_node_by_def_id(def_id).expect_closure()
else {
bug!()
};