let fn_ty = func.layout().ty;
let sig = ty_fn_sig(fx.tcx, fn_ty);
- let return_place = destination.as_ref().map(|(place, _)| trans_place(fx, place));
+ let return_place = destination
+ .as_ref()
+ .map(|(place, _)| trans_place(fx, place));
// Unpack arguments tuple for closures
let args = if sig.abi == Abi::RustCall {
let ret = match return_place {
Some(ret) => ret,
None => {
- println!("codegen_call(fx, {:?}, {:?}, {:?})", func, args, destination);
+ println!(
+ "codegen_call(fx, {:?}, {:?}, {:?})",
+ func, args, destination
+ );
// Insert non returning intrinsics here
match intrinsic {
"abort" => {
fx.comments.clone()
}
-fn trans_stmt<'a, 'tcx: 'a>(
- fx: &mut FunctionCx<'a, 'tcx>,
- cur_ebb: Ebb,
- stmt: &Statement<'tcx>,
-) {
+fn trans_stmt<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx>, cur_ebb: Ebb, stmt: &Statement<'tcx>) {
fx.tcx.sess.warn(&format!("stmt {:?}", stmt));
let inst = fx.bcx.func.layout.last_inst(cur_ebb).unwrap();
if layout.is_unsized() {
unimpl!("Unsized places are not yet implemented");
}
- CPlace::Addr(
- base.to_cvalue(fx).load_value(fx),
- layout,
- )
- },
+ CPlace::Addr(base.to_cvalue(fx).load_value(fx), layout)
+ }
ProjectionElem::Field(field, _ty) => base.place_field(fx, field),
ProjectionElem::Index(local) => {
let index = fx.get_local_place(local).to_cvalue(fx).load_value(fx);