diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index caab40fcd9dd..b2e9ba144d6b 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -644,12 +644,16 @@ pub fn as_str(&self) -> &'static str {
}
}
- pub fn test_description(&self) -> &'static str {
+ pub fn description(&self) -> String {
match self {
Kind::Test => "Testing",
Kind::Bench => "Benchmarking",
- _ => panic!("not a test command: {}!", self.as_str()),
+ Kind::Doc => "Documenting",
+ Kind::Run => "Running",
+ Kind::Suggest => "Suggesting",
+ _ => return format!("{self:?}"),
}
+ .to_owned()
}
}
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index fb76dffd0715..f7d30de67eba 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -1020,8 +1020,8 @@ fn msg(
host: impl Into