]> git.lizzy.rs Git - rust.git/commitdiff
bootstrap: better error message for no_std docs
authorEric Huss <eric@huss.org>
Mon, 28 Mar 2022 19:13:18 +0000 (12:13 -0700)
committerEric Huss <eric@huss.org>
Mon, 28 Mar 2022 19:13:18 +0000 (12:13 -0700)
src/bootstrap/doc.rs

index be55871b56a2801468606afae5fe615c50c52d1e..5f16716a0fdafe4ce7378815ee3259d3c74a8765 100644 (file)
@@ -432,6 +432,12 @@ fn run(self, builder: &Builder<'_>) {
         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);