From 757913df08f11e216b617a557959f5c28d2974ca Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 20 Aug 2022 22:24:31 -0700 Subject: [PATCH] bootstrap: Don't allow rustfmt to fail on dist. When running `x.py dist`, rustfmt was being allowed to fail when missing-tools is true. This isn't much of an issue in practice since other CI jobs will fail if rustfmt fails. This code was just leftovers from when rustfmt was tracked in toolstate, and this removes it to make it clear that it no longer works that way. --- src/bootstrap/dist.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 6291b204e485f..6bf57a89e896f 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1226,17 +1226,10 @@ impl Step for Rustfmt { let rustfmt = builder .ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() }) - .or_else(|| { - missing_tool("Rustfmt", builder.build.config.missing_tools); - None - })?; + .expect("rustfmt expected to build - essential tool"); let cargofmt = builder .ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() }) - .or_else(|| { - missing_tool("Cargofmt", builder.build.config.missing_tools); - None - })?; - + .expect("cargo fmt expected to build - essential tool"); let mut tarball = Tarball::new(builder, "rustfmt", &target.triple); tarball.set_overlay(OverlayKind::Rustfmt); tarball.is_preview(true);