mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Sync from rust 7aef4bec4b
This commit is contained in:
+2
-3
@@ -48,9 +48,8 @@ pub(crate) fn codegen_fn<'tcx>(
|
||||
let _mir_guard = crate::PrintOnPanic(|| {
|
||||
let mut buf = Vec::new();
|
||||
with_no_trimmed_paths!({
|
||||
use rustc_middle::mir::pretty;
|
||||
let options = pretty::PrettyPrintMirOptions::from_cli(tcx);
|
||||
pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf, options).unwrap();
|
||||
let writer = pretty::MirWriter::new(tcx);
|
||||
writer.write_mir_fn(mir, &mut buf).unwrap();
|
||||
});
|
||||
String::from_utf8_lossy(&buf).into_owned()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user