about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-13 19:02:24 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-13 19:02:24 +0100
commitbf94b3819ca8bd6574d0459690c247197723b9d1 (patch)
treeb0a53b5e911396e88ad7502cb3bdbf35d9146e69
parent7ec44711e6d3db9868cf97de64eb8a4f7098a66a (diff)
downloadrust-bf94b3819ca8bd6574d0459690c247197723b9d1.tar.gz
rust-bf94b3819ca8bd6574d0459690c247197723b9d1.zip
Rustfmt
-rw-r--r--src/bin/cg_clif.rs20
-rw-r--r--src/common.rs2
2 files changed, 10 insertions, 12 deletions
diff --git a/src/bin/cg_clif.rs b/src/bin/cg_clif.rs
index 497c20f59d6..f4d23ebcf4e 100644
--- a/src/bin/cg_clif.rs
+++ b/src/bin/cg_clif.rs
@@ -26,17 +26,15 @@ impl rustc_driver::Callbacks for CraneliftPassesCallbacks {
 
         config.opts.cg.panic = Some(PanicStrategy::Abort);
         config.opts.debugging_opts.panic_abort_tests = true;
-        config.opts.maybe_sysroot = Some(
-            config.opts.maybe_sysroot.clone().unwrap_or_else(
-                || std::env::current_exe()
-                    .unwrap()
-                    .parent()
-                    .unwrap()
-                    .parent()
-                    .unwrap()
-                    .to_owned(),
-            ),
-        );
+        config.opts.maybe_sysroot = Some(config.opts.maybe_sysroot.clone().unwrap_or_else(|| {
+            std::env::current_exe()
+                .unwrap()
+                .parent()
+                .unwrap()
+                .parent()
+                .unwrap()
+                .to_owned()
+        }));
     }
 }
 
diff --git a/src/common.rs b/src/common.rs
index 466758f2f86..60839227274 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -364,7 +364,7 @@ impl<'tcx, M: Module> FunctionCx<'_, 'tcx, M> {
         self.instance.subst_mir_and_normalize_erasing_regions(
             self.tcx,
             ty::ParamEnv::reveal_all(),
-            value
+            value,
         )
     }