Skip to content

Commit 0fba9b4

Browse files
committed
introduce PrettyPrintMirOptions for cosmetic MIR dump options
initially starting with `-Z mir-include-spans` because we want them in the NLL mir dump pass
1 parent 8a26d21 commit 0fba9b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/base.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ pub(crate) fn codegen_fn<'tcx>(
4444
let _mir_guard = crate::PrintOnPanic(|| {
4545
let mut buf = Vec::new();
4646
with_no_trimmed_paths!({
47-
rustc_middle::mir::pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf)
48-
.unwrap();
47+
use rustc_middle::mir::pretty;
48+
let options = pretty::PrettyPrintMirOptions::from_cli(tcx);
49+
pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf, options).unwrap();
4950
});
5051
String::from_utf8_lossy(&buf).into_owned()
5152
});

0 commit comments

Comments
 (0)