introduce PrettyPrintMirOptions
for cosmetic MIR dump options
initially starting with `-Z mir-include-spans` because we want them in the NLL mir dump pass
This commit is contained in:
parent
8a26d21ce2
commit
0fba9b4dbb
@ -44,8 +44,9 @@ pub(crate) fn codegen_fn<'tcx>(
|
||||
let _mir_guard = crate::PrintOnPanic(|| {
|
||||
let mut buf = Vec::new();
|
||||
with_no_trimmed_paths!({
|
||||
rustc_middle::mir::pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf)
|
||||
.unwrap();
|
||||
use rustc_middle::mir::pretty;
|
||||
let options = pretty::PrettyPrintMirOptions::from_cli(tcx);
|
||||
pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf, options).unwrap();
|
||||
});
|
||||
String::from_utf8_lossy(&buf).into_owned()
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user