Skip to content

Commit 638a52c

Browse files
Improve librustdoc error when a file creation/modification failed
1 parent 41f2b6b commit 638a52c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustdoc/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,9 @@ fn run_renderer<
760760
tcx.dcx().struct_fatal(format!("couldn't generate documentation: {}", e.error));
761761
let file = e.file.display().to_string();
762762
if !file.is_empty() {
763-
msg.note(format!("failed to create or modify \"{file}\""));
763+
msg.note(format!("failed to create or modify {e}"));
764+
} else {
765+
msg.note(format!("failed to create or modify file: {e}"));
764766
}
765767
msg.emit();
766768
}

0 commit comments

Comments
 (0)