]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/install.rs
Rollup merge of #88706 - ThePuzzlemaker:issue-88609, r=jackh726
[rust.git] / src / bootstrap / install.rs
index 8a1b6df0dafe34910e2631733e8cb4642c7ddb65..06acf1a9a008367bc2f85cabb20db0090ad06619 100644 (file)
@@ -139,12 +139,8 @@ fn run($sel, $builder: &Builder<'_>) {
 
 install!((self, builder, _config),
     Docs, "src/doc", _config.docs, only_hosts: false, {
-        if let Some(tarball) = builder.ensure(dist::Docs { host: self.target }) {
-            install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball);
-        } else {
-            panic!("docs are not available to install, \
-                check that `build.docs` is true in `config.toml`");
-        }
+        let tarball = builder.ensure(dist::Docs { host: self.target }).expect("missing docs");
+        install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball);
     };
     Std, "library/std", true, only_hosts: false, {
         for target in &builder.targets {
@@ -158,7 +154,9 @@ fn run($sel, $builder: &Builder<'_>) {
         }
     };
     Cargo, "cargo", Self::should_build(_config), only_hosts: true, {
-        let tarball = builder.ensure(dist::Cargo { compiler: self.compiler, target: self.target });
+        let tarball = builder
+            .ensure(dist::Cargo { compiler: self.compiler, target: self.target })
+            .expect("missing cargo");
         install_sh(builder, "cargo", self.compiler.stage, Some(self.target), &tarball);
     };
     Rls, "rls", Self::should_build(_config), only_hosts: true, {
@@ -182,7 +180,9 @@ fn run($sel, $builder: &Builder<'_>) {
         }
     };
     Clippy, "clippy", Self::should_build(_config), only_hosts: true, {
-        let tarball = builder.ensure(dist::Clippy { compiler: self.compiler, target: self.target });
+        let tarball = builder
+            .ensure(dist::Clippy { compiler: self.compiler, target: self.target })
+            .expect("missing clippy");
         install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball);
     };
     Miri, "miri", Self::should_build(_config), only_hosts: true, {