Compute generator saved locals on MIR.

This commit is contained in:
Camille GILLOT 2022-10-01 15:57:22 +02:00
parent 400cb9aa41
commit 60e04d1e8c
18 changed files with 392 additions and 19 deletions

View file

@ -893,6 +893,15 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
}
});
if tcx.sess.opts.unstable_opts.drop_tracking_mir {
tcx.hir().par_body_owners(|def_id| {
if let rustc_hir::def::DefKind::Generator = tcx.def_kind(def_id) {
tcx.ensure().mir_generator_witnesses(def_id);
tcx.ensure().check_generator_obligations(def_id);
}
});
}
sess.time("layout_testing", || layout_test::test_layout(tcx));
// Avoid overwhelming user with errors if borrow checking failed.