1
Fork 0

Rollup merge of #101428 - JakobDegen:build-tests, r=oli-obk

Add mir building test directory

The first commit renames `mir-map.0` mir dumps to `built.after` dumps. I am happy to drop this commit if someone can explain the origin of the name.

The second commit moves a bunch of mir building tests into their own directory. I did my best to make sure that all of these tests are actually testing mir building, and not just incidentally using `built.after`

r? ``@oli-obk``
This commit is contained in:
Michael Howell 2022-10-30 19:31:37 -07:00 committed by GitHub
commit 7e62406e01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 136 additions and 112 deletions

View file

@ -288,7 +288,7 @@ fn mir_const<'tcx>(
let mut body = tcx.mir_built(def).steal();
rustc_middle::mir::dump_mir(tcx, None, "mir_map", &0, &body, |_, _| Ok(()));
pass_manager::dump_mir_for_phase_change(tcx, &body);
pm::run_passes(
tcx,

View file

@ -845,7 +845,7 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> {
span,
);
rustc_middle::mir::dump_mir(tcx, None, "mir_map", &0, &body, |_, _| Ok(()));
crate::pass_manager::dump_mir_for_phase_change(tcx, &body);
body
}