]> git.lizzy.rs Git - rust.git/commitdiff
Rustfmt
authorbjorn3 <bjorn3@users.noreply.github.com>
Wed, 8 Aug 2018 17:33:37 +0000 (19:33 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Wed, 8 Aug 2018 17:33:37 +0000 (19:33 +0200)
src/abi.rs
src/base.rs

index 25aab1940987db16224c39a27861389733eb2ccd..b6a29d0747522bb9092df044fea44088c0a5ec1e 100644 (file)
@@ -290,7 +290,9 @@ pub fn codegen_call<'a, 'tcx: 'a>(
     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 {
@@ -331,7 +333,10 @@ pub fn codegen_call<'a, 'tcx: 'a>(
             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" => {
index 6fc61ca1fa8ae15dc65db684edcb48b1bff8251a..be8281c59f4740bac0a3b421edb52a92c2dd1d57 100644 (file)
@@ -231,11 +231,7 @@ pub fn trans_fn<'a, 'tcx: 'a>(
     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();
@@ -825,11 +821,8 @@ pub fn trans_place<'a, 'tcx: 'a>(
                     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);