From 8669f7efaf0bb4e4d27b34a035883687abaf6ec7 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 19 Dec 2022 14:48:45 +0000 Subject: [PATCH] Don't panic on stable since miri is not available there --- src/bootstrap/install.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index 7672b7c913594..38426f3a447e0 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -200,10 +200,14 @@ install!((self, builder, _config), install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball); }; Miri, alias = "miri", Self::should_build(_config), only_hosts: true, { - let tarball = builder - .ensure(dist::Miri { compiler: self.compiler, target: self.target }) - .expect("missing miri"); - install_sh(builder, "miri", self.compiler.stage, Some(self.target), &tarball); + if let Some(tarball) = builder.ensure(dist::Miri { compiler: self.compiler, target: self.target }) { + install_sh(builder, "miri", self.compiler.stage, Some(self.target), &tarball); + } else { + // Miri is only available on nightly + builder.info( + &format!("skipping Install miri stage{} ({})", self.compiler.stage, self.target), + ); + } }; Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, { if let Some(tarball) = builder.ensure(dist::Rustfmt {