From 935e281959b5d02dd8939da58f2a648a28af2a9b Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 28 Mar 2022 12:13:18 -0700 Subject: [PATCH] bootstrap: better error message for no_std docs --- src/bootstrap/doc.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index be55871b56a28..5f16716a0fdaf 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -432,6 +432,12 @@ impl Step for Std { let stage = self.stage; let target = self.target; builder.info(&format!("Documenting stage{} std ({})", stage, target)); + if builder.no_std(target) == Some(true) { + panic!( + "building std documentation for no_std target {target} is not supported\n\ + Set `docs = false` in the config to disable documentation." + ); + } let out = builder.doc_out(target); t!(fs::create_dir_all(&out)); let compiler = builder.compiler(stage, builder.config.build);