mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Rustfmt
This commit is contained in:
parent
65fa8eddbb
commit
eb89830f21
@ -21,7 +21,8 @@ pub fn trans_mono_item<'a, 'tcx: 'a>(cx: &mut CodegenCx<'a, 'tcx>, mono_item: Mo
|
||||
} => {
|
||||
let mut mir = ::std::io::Cursor::new(Vec::new());
|
||||
::rustc_mir::util::write_mir_pretty(tcx, Some(def_id), &mut mir).unwrap();
|
||||
let mir_file_name = "target/out/mir/".to_string() + &format!("{:?}", def_id).replace('/', "@");
|
||||
let mir_file_name =
|
||||
"target/out/mir/".to_string() + &format!("{:?}", def_id).replace('/', "@");
|
||||
::std::fs::write(mir_file_name, mir.into_inner()).unwrap();
|
||||
let _print_guard = PrintOnPanic(format!("{:?}", inst));
|
||||
|
||||
|
@ -106,7 +106,9 @@ fn trans_const_value<'a, 'tcx: 'a>(
|
||||
CValue::const_val(fx, ty, bits as i128 as i64)
|
||||
}
|
||||
TypeVariants::TyFnDef(def_id, substs) => {
|
||||
let func_ref = fx.get_function_ref(Instance::resolve(fx.tcx, ParamEnv::reveal_all(), def_id, substs).unwrap());
|
||||
let func_ref = fx.get_function_ref(
|
||||
Instance::resolve(fx.tcx, ParamEnv::reveal_all(), def_id, substs).unwrap(),
|
||||
);
|
||||
CValue::Func(func_ref, layout)
|
||||
}
|
||||
_ => trans_const_place(fx, const_).to_cvalue(fx),
|
||||
|
Loading…
Reference in New Issue
Block a user