Skip to content

Commit 7167f8b

Browse files
committed
change output of dist cargo and clippy to be consistent with other tools
1 parent 0c8baa7 commit 7167f8b

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/bootstrap/dist.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ pub struct Cargo {
951951
}
952952

953953
impl Step for Cargo {
954-
type Output = GeneratedTarball;
954+
type Output = Option<GeneratedTarball>;
955955
const ONLY_HOSTS: bool = true;
956956

957957
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -969,7 +969,7 @@ impl Step for Cargo {
969969
});
970970
}
971971

972-
fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
972+
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
973973
let compiler = self.compiler;
974974
let target = self.target;
975975

@@ -994,7 +994,7 @@ impl Step for Cargo {
994994
}
995995
}
996996

997-
tarball.generate()
997+
Some(tarball.generate())
998998
}
999999
}
10001000

@@ -1106,7 +1106,7 @@ pub struct Clippy {
11061106
}
11071107

11081108
impl Step for Clippy {
1109-
type Output = GeneratedTarball;
1109+
type Output = Option<GeneratedTarball>;
11101110
const ONLY_HOSTS: bool = true;
11111111

11121112
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -1124,7 +1124,7 @@ impl Step for Clippy {
11241124
});
11251125
}
11261126

1127-
fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
1127+
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
11281128
let compiler = self.compiler;
11291129
let target = self.target;
11301130
assert!(builder.config.extended);
@@ -1145,7 +1145,7 @@ impl Step for Clippy {
11451145
tarball.add_file(clippy, "bin", 0o755);
11461146
tarball.add_file(cargoclippy, "bin", 0o755);
11471147
tarball.add_legal_and_readme_to("share/doc/clippy");
1148-
tarball.generate()
1148+
Some(tarball.generate())
11491149
}
11501150
}
11511151

@@ -1374,8 +1374,8 @@ impl Step for Extended {
13741374
return;
13751375
}
13761376

1377-
tarballs.push(cargo_installer);
1378-
tarballs.push(clippy_installer);
1377+
tarballs.extend(cargo_installer);
1378+
tarballs.extend(clippy_installer);
13791379
tarballs.extend(rust_demangler_installer.clone());
13801380
tarballs.extend(rls_installer.clone());
13811381
tarballs.extend(rust_analyzer_installer.clone());

src/bootstrap/install.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ install!((self, builder, _config),
154154
}
155155
};
156156
Cargo, "cargo", Self::should_build(_config), only_hosts: true, {
157-
let tarball = builder.ensure(dist::Cargo { compiler: self.compiler, target: self.target });
157+
let tarball = builder
158+
.ensure(dist::Cargo { compiler: self.compiler, target: self.target })
159+
.expect("missing cargo");
158160
install_sh(builder, "cargo", self.compiler.stage, Some(self.target), &tarball);
159161
};
160162
Rls, "rls", Self::should_build(_config), only_hosts: true, {
@@ -178,7 +180,9 @@ install!((self, builder, _config),
178180
}
179181
};
180182
Clippy, "clippy", Self::should_build(_config), only_hosts: true, {
181-
let tarball = builder.ensure(dist::Clippy { compiler: self.compiler, target: self.target });
183+
let tarball = builder
184+
.ensure(dist::Clippy { compiler: self.compiler, target: self.target })
185+
.expect("missing clippy");
182186
install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball);
183187
};
184188
Miri, "miri", Self::should_build(_config), only_hosts: true, {

0 commit comments

Comments
 (0)