Skip to content

Commit e0002c1

Browse files
committed
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.
1 parent 8ebfc91 commit e0002c1

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/driver/mod.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,27 +79,6 @@ fn trans_mono_item<'tcx, M: Module>(
7979
let _inst_guard =
8080
crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name));
8181
debug_assert!(!inst.substs.needs_infer());
82-
let _mir_guard = crate::PrintOnPanic(|| {
83-
match inst.def {
84-
InstanceDef::Item(_)
85-
| InstanceDef::DropGlue(_, _)
86-
| InstanceDef::Virtual(_, _) => {
87-
let mut mir = ::std::io::Cursor::new(Vec::new());
88-
crate::rustc_mir::util::write_mir_pretty(
89-
tcx,
90-
Some(inst.def_id()),
91-
&mut mir,
92-
)
93-
.unwrap();
94-
String::from_utf8(mir.into_inner()).unwrap()
95-
}
96-
_ => {
97-
// FIXME fix write_mir_pretty for these instances
98-
format!("{:#?}", tcx.instance_mir(inst.def))
99-
}
100-
}
101-
});
102-
10382
tcx.sess
10483
.time("codegen fn", || crate::base::trans_fn(cx, inst, linkage));
10584
}

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ extern crate rustc_fs_util;
2323
extern crate rustc_hir;
2424
extern crate rustc_incremental;
2525
extern crate rustc_index;
26-
extern crate rustc_mir;
2726
extern crate rustc_session;
2827
extern crate rustc_span;
2928
extern crate rustc_symbol_mangling;

0 commit comments

Comments
 (0)