about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-10-26 21:18:28 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-11-05 18:06:09 -0500
commit8d2fa72fc8064e7800e9d2a6512fa7eb302e8d8d (patch)
treee5612ce90d986271e4792115eccc9464f57312be /src/bootstrap/builder.rs
parent31ecd2a124ff9c466c9661862aa0a0ad2d48d1a1 (diff)
downloadrust-8d2fa72fc8064e7800e9d2a6512fa7eb302e8d8d.tar.gz
rust-8d2fa72fc8064e7800e9d2a6512fa7eb302e8d8d.zip
Get `--fix` working for everything except rustdoc
Here's the error for rustdoc:

```
Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
error: no library targets found in package `rustdoc-tool`
```
Diffstat (limited to 'src/bootstrap/builder.rs')
-rw-r--r--src/bootstrap/builder.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 532949e47a1..011b053f898 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -851,8 +851,8 @@ impl<'a> Builder<'a> {
             }
             rustflags.env("RUSTFLAGS_BOOTSTRAP");
             if cmd == "clippy" {
-                // clippy overwrites any sysroot we pass on the command line.
-                // Tell it to use the appropriate sysroot instead.
+                // clippy overwrites sysroot if we pass it to cargo.
+                // Pass it directly to clippy instead.
                 // NOTE: this can't be fixed in clippy because we explicitly don't set `RUSTC`,
                 // so it has no way of knowing the sysroot.
                 rustflags.arg("--sysroot");
@@ -867,8 +867,7 @@ impl<'a> Builder<'a> {
                 // Explicitly does *not* set `--cfg=bootstrap`, since we're using a nightly clippy.
                 let host_version = Command::new("rustc").arg("--version").output().map_err(|_| ());
                 let output = host_version.and_then(|output| {
-                    if output.status.success()
-                    {
+                    if output.status.success() {
                         Ok(output)
                     } else {
                         Err(())