diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-27 19:15:37 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-05 18:36:17 +0000 |
| commit | d0b0b028a68eaee609b235a8cb5627466b2d79fb (patch) | |
| tree | 1a0be7516e96bf237facaae82c9ed5a3ef96df86 /compiler/rustc_interface/src | |
| parent | 820bfffc25fee9866aa8176529091e04b8824f09 (diff) | |
| download | rust-d0b0b028a68eaee609b235a8cb5627466b2d79fb.tar.gz rust-d0b0b028a68eaee609b235a8cb5627466b2d79fb.zip | |
Eagerly detect coroutine recursion pre-mono when possible
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 8a121c5a865..9c5f30012e7 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -909,6 +909,11 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { tcx.ensure_ok().check_coroutine_obligations( tcx.typeck_root_def_id(def_id.to_def_id()).expect_local(), ); + // Eagerly check the unsubstituted layout for cycles. + tcx.ensure_ok().layout_of( + ty::TypingEnv::post_analysis(tcx, def_id.to_def_id()) + .as_query_input(tcx.type_of(def_id).instantiate_identity()), + ); } }); }); |
