Run check_match
and check_liveness
when MIR is built instead of having an explicit phase for them
This commit is contained in:
parent
5bb58a68de
commit
334423263a
18 changed files with 321 additions and 328 deletions
|
@ -761,27 +761,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
|
|||
// passes are timed inside typeck
|
||||
rustc_hir_analysis::check_crate(tcx)?;
|
||||
|
||||
sess.time("misc_checking_2", || {
|
||||
parallel!(
|
||||
{
|
||||
sess.time("match_checking", || {
|
||||
tcx.hir().par_body_owners(|def_id| tcx.ensure().check_match(def_id))
|
||||
});
|
||||
},
|
||||
{
|
||||
sess.time("liveness_checking", || {
|
||||
tcx.hir().par_body_owners(|def_id| {
|
||||
// this must run before MIR dump, because
|
||||
// "not all control paths return a value" is reported here.
|
||||
//
|
||||
// maybe move the check to a MIR pass?
|
||||
tcx.ensure().check_liveness(def_id);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
sess.time("MIR_borrow_checking", || {
|
||||
tcx.hir().par_body_owners(|def_id| tcx.ensure().mir_borrowck(def_id));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue