Remove MIR dump on panic

I haven't used it for a long time and it adds a lot of noise to the
panic print.
This commit is contained in:
bjorn3 2020-10-11 13:24:14 +02:00
parent 8ebfc9142f
commit e0002c1892
2 changed files with 0 additions and 22 deletions

View file

@ -79,27 +79,6 @@ fn trans_mono_item<'tcx, M: Module>(
let _inst_guard =
crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name));
debug_assert!(!inst.substs.needs_infer());
let _mir_guard = crate::PrintOnPanic(|| {
match inst.def {
InstanceDef::Item(_)
| InstanceDef::DropGlue(_, _)
| InstanceDef::Virtual(_, _) => {
let mut mir = ::std::io::Cursor::new(Vec::new());
crate::rustc_mir::util::write_mir_pretty(
tcx,
Some(inst.def_id()),
&mut mir,
)
.unwrap();
String::from_utf8(mir.into_inner()).unwrap()
}
_ => {
// FIXME fix write_mir_pretty for these instances
format!("{:#?}", tcx.instance_mir(inst.def))
}
}
});
tcx.sess
.time("codegen fn", || crate::base::trans_fn(cx, inst, linkage));
}

View file

@ -23,7 +23,6 @@ extern crate rustc_fs_util;
extern crate rustc_hir;
extern crate rustc_incremental;
extern crate rustc_index;
extern crate rustc_mir;
extern crate rustc_session;
extern crate rustc_span;
extern crate rustc_symbol_mangling;