1
Fork 0

Do check_coroutine_obligations once per typeck root

This commit is contained in:
Michael Goulet 2024-04-15 19:44:23 -04:00
parent aa1653e5be
commit d29178c2ef
8 changed files with 149 additions and 130 deletions

View file

@ -759,7 +759,9 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
tcx.hir().par_body_owners(|def_id| {
if tcx.is_coroutine(def_id.to_def_id()) {
tcx.ensure().mir_coroutine_witnesses(def_id);
tcx.ensure().check_coroutine_obligations(def_id);
tcx.ensure().check_coroutine_obligations(
tcx.typeck_root_def_id(def_id.to_def_id()).expect_local(),
);
}
});
sess.time("layout_testing", || layout_test::test_layout(tcx));