Eagerly detect coroutine recursion pre-mono when possible
This commit is contained in:
parent
820bfffc25
commit
d0b0b028a6
12 changed files with 37 additions and 95 deletions
|
@ -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()),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue