mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 11:33:04 +00:00
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:
parent
8ebfc9142f
commit
e0002c1892
@ -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));
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user