Skip to content

Commit e43eef8

Browse files
committed
Sync from rust 7aef4bec4bec16cb6204d51eb633873e23b18771
2 parents 9de73c8 + 3293a0b commit e43eef8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/base.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ pub(crate) fn codegen_fn<'tcx>(
4848
let _mir_guard = crate::PrintOnPanic(|| {
4949
let mut buf = Vec::new();
5050
with_no_trimmed_paths!({
51-
use rustc_middle::mir::pretty;
52-
let options = pretty::PrettyPrintMirOptions::from_cli(tcx);
53-
pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf, options).unwrap();
51+
let writer = pretty::MirWriter::new(tcx);
52+
writer.write_mir_fn(mir, &mut buf).unwrap();
5453
});
5554
String::from_utf8_lossy(&buf).into_owned()
5655
});

0 commit comments

Comments
 (0)