Skip to content

Commit 935e281

Browse files
committed
bootstrap: better error message for no_std docs
1 parent 600ec28 commit 935e281

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/doc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ impl Step for Std {
432432
let stage = self.stage;
433433
let target = self.target;
434434
builder.info(&format!("Documenting stage{} std ({})", stage, target));
435+
if builder.no_std(target) == Some(true) {
436+
panic!(
437+
"building std documentation for no_std target {target} is not supported\n\
438+
Set `docs = false` in the config to disable documentation."
439+
);
440+
}
435441
let out = builder.doc_out(target);
436442
t!(fs::create_dir_all(&out));
437443
let compiler = builder.compiler(stage, builder.config.build);

0 commit comments

Comments
 (0)