diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-04-23 17:25:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-23 17:25:16 +0200 |
| commit | e15d6f9d8580b5f54376c2c48bd5ecf8ba0b5ce7 (patch) | |
| tree | 1fa63bd3dbb0e1ddef8f3ccc9c9f170dcbcc2bc7 /compiler/rustc_interface/src | |
| parent | 2d7d4800548e3b8ad3133b909aa9020954567640 (diff) | |
| parent | a8c9a0bd8167c99557c9d475631c844775883336 (diff) | |
| download | rust-e15d6f9d8580b5f54376c2c48bd5ecf8ba0b5ce7.tar.gz rust-e15d6f9d8580b5f54376c2c48bd5ecf8ba0b5ce7.zip | |
Rollup merge of #123993 - compiler-errors:coroutine-obl, r=lcnr
Do `check_coroutine_obligations` once per typeck root We only need to do `check_coroutine_obligations` once per typeck root, especially since the new solver can't really (easily) associate which obligations correspond to which coroutines. This requires us to move the checks for sized coroutine fields into `mir_coroutine_witnesses`, but that's fine imo. r? lcnr
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)); |
