Skip to content

Commit 530a59f

Browse files
authored
Rollup merge of rust-lang#99139 - jyn514:dist-tool-help, r=Mark-Simulacrum
Give a better error when `x dist` fails for an optional tool Before: ``` thread 'main' panicked at 'Unable to build RLS', dist.rs:42:9 ``` After: ``` thread 'main' panicked at 'Unable to build submodule tool RLS (use `missing-tools = true` to ignore this failure) note: not all tools are available on all nightlies help: see https://forge.rust-lang.org/infra/toolstate.html for more information', dist.rs:43:9 ``` Closes rust-lang#85683 by explaining better why the error is expected.
2 parents fa8f684 + 9395103 commit 530a59f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bootstrap/dist.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ fn missing_tool(tool_name: &str, skip: bool) {
3939
if skip {
4040
println!("Unable to build {}, skipping dist", tool_name)
4141
} else {
42-
panic!("Unable to build {}", tool_name)
42+
let help = "note: not all tools are available on all nightlies\nhelp: see https://forge.rust-lang.org/infra/toolstate.html for more information";
43+
panic!(
44+
"Unable to build submodule tool {} (use `missing-tools = true` to ignore this failure)\n{}",
45+
tool_name, help
46+
)
4347
}
4448
}
4549

0 commit comments

Comments
 (0)