Skip to content

Commit

Permalink
bootstrap: better error message for no_std docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Mar 28, 2022
1 parent 600ec28 commit 935e281
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 935e281

Please sign in to comment.