diff options
| author | Michael Goulet <michael@errs.io> | 2024-04-15 19:44:23 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-04-15 19:44:58 -0400 |
| commit | d29178c2efe7846fdb8c442219d7b70ae83e18e7 (patch) | |
| tree | 89387e3ffde26939db648f1d631aedad80fa3b66 /compiler/rustc_interface/src | |
| parent | aa1653e5be13cdcb818ae1f933bec7ad15e33b70 (diff) | |
| download | rust-d29178c2efe7846fdb8c442219d7b70ae83e18e7.tar.gz rust-d29178c2efe7846fdb8c442219d7b70ae83e18e7.zip | |
Do check_coroutine_obligations once per typeck root
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 91cef02c7d1..b593c41a8ea 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -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)); |
