about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2016-10-16 14:57:25 +0530
committerSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2016-10-16 14:57:25 +0530
commitabc715e985358e678feef8beab0035d46c5a36b6 (patch)
tree72362b22a773e83b28bfe8dcd8bf95120013025c /src/bootstrap
parent6dc035ed911672c6a1f7afc9eed15fb08e574e5b (diff)
downloadrust-abc715e985358e678feef8beab0035d46c5a36b6.tar.gz
rust-abc715e985358e678feef8beab0035d46c5a36b6.zip
run rustfmt on bootstrap/bin folder
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bin/rustc.rs19
-rw-r--r--src/bootstrap/bin/rustdoc.rs10
2 files changed, 16 insertions, 13 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index cdbbc229bc8..1e507868edb 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -36,8 +36,9 @@ fn main() {
     let args = env::args_os().skip(1).collect::<Vec<_>>();
     // Detect whether or not we're a build script depending on whether --target
     // is passed (a bit janky...)
-    let target = args.windows(2).find(|w| &*w[0] == "--target")
-                                .and_then(|w| w[1].to_str());
+    let target = args.windows(2)
+        .find(|w| &*w[0] == "--target")
+        .and_then(|w| w[1].to_str());
     let version = args.iter().find(|w| &**w == "-vV");
 
     // Build scripts always use the snapshot compiler which is guaranteed to be
@@ -64,9 +65,10 @@ fn main() {
 
     let mut cmd = Command::new(rustc);
     cmd.args(&args)
-       .arg("--cfg").arg(format!("stage{}", stage))
-       .env(bootstrap::util::dylib_path_var(),
-            env::join_paths(&dylib_path).unwrap());
+        .arg("--cfg")
+        .arg(format!("stage{}", stage))
+        .env(bootstrap::util::dylib_path_var(),
+             env::join_paths(&dylib_path).unwrap());
 
     if let Some(target) = target {
         // The stage0 compiler has a special sysroot distinct from what we
@@ -101,9 +103,8 @@ fn main() {
         // This... is a bit of a hack how we detect this. Ideally this
         // information should be encoded in the crate I guess? Would likely
         // require an RFC amendment to RFC 1513, however.
-        let is_panic_abort = args.windows(2).any(|a| {
-            &*a[0] == "--crate-name" && &*a[1] == "panic_abort"
-        });
+        let is_panic_abort = args.windows(2)
+            .any(|a| &*a[0] == "--crate-name" && &*a[1] == "panic_abort");
         if is_panic_abort {
             cmd.arg("-C").arg("panic=abort");
         }
@@ -114,7 +115,7 @@ fn main() {
             cmd.arg("-g");
         }
         let debug_assertions = match env::var("RUSTC_DEBUG_ASSERTIONS") {
-            Ok(s) => if s == "true" {"y"} else {"n"},
+            Ok(s) => if s == "true" { "y" } else { "n" },
             Err(..) => "n",
         };
         cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions));
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 658ff358d62..67358e540da 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -29,10 +29,12 @@ fn main() {
 
     let mut cmd = Command::new(rustdoc);
     cmd.args(&args)
-       .arg("--cfg").arg(format!("stage{}", stage))
-       .arg("--cfg").arg("dox")
-       .env(bootstrap::util::dylib_path_var(),
-            env::join_paths(&dylib_path).unwrap());
+        .arg("--cfg")
+        .arg(format!("stage{}", stage))
+        .arg("--cfg")
+        .arg("dox")
+        .env(bootstrap::util::dylib_path_var(),
+             env::join_paths(&dylib_path).unwrap());
     std::process::exit(match cmd.status() {
         Ok(s) => s.code().unwrap_or(1),
         Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),