Skip to content

Commit ed0c091

Browse files
authored
Rollup merge of #146000 - GuillaumeGomez:rustdoc-error-improvement, r=notriddle
Improve librustdoc error when a file creation/modification failed The message before looks like this: ``` failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/" ``` And with this change it looks like this: ``` failed to create or modify "/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/search.index/entry/": failed to read column from disk: data consumer error: missing field `unknown number` at line 1 column 8 ``` r? ````@lolbinarycat````
2 parents a1941a0 + 638a52c commit ed0c091

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)