We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fbb075 commit 6a744eaCopy full SHA for 6a744ea
src/librustdoc/markdown.rs
@@ -1,4 +1,4 @@
1
-use std::fs::File;
+use std::fs::{create_dir_all, File};
2
use std::io::prelude::*;
3
use std::path::PathBuf;
4
@@ -40,6 +40,11 @@ pub fn render(
40
diag: &rustc_errors::Handler,
41
edition: Edition,
42
) -> i32 {
43
+ if let Err(e) = create_dir_all(&options.output) {
44
+ diag.struct_err(&format!("{}: {}", options.output.display(), e)).emit();
45
+ return 4;
46
+ }
47
+
48
let mut output = options.output;
49
output.push(input.file_name().unwrap());
50
output.set_extension("html");
0 commit comments