diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-08-29 19:33:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-29 19:33:05 -0500 |
| commit | b722da955f8151edeef8b3fea498a43975441742 (patch) | |
| tree | 717dc302438a94446f9539636cacfa8124968788 /src/librustdoc/lib.rs | |
| parent | a7fd14f89d1aea5cb979dcf1473abac74a1f8cc5 (diff) | |
| parent | 638a52c789e92009cf26ed73a4a5bc597814fe7b (diff) | |
| download | rust-b722da955f8151edeef8b3fea498a43975441742.tar.gz rust-b722da955f8151edeef8b3fea498a43975441742.zip | |
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``````
Diffstat (limited to 'src/librustdoc/lib.rs')
| -rw-r--r-- | src/librustdoc/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index cd29b096ccf..f62eba4b3c1 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -760,7 +760,9 @@ fn run_renderer< tcx.dcx().struct_fatal(format!("couldn't generate documentation: {}", e.error)); let file = e.file.display().to_string(); if !file.is_empty() { - msg.note(format!("failed to create or modify \"{file}\"")); + msg.note(format!("failed to create or modify {e}")); + } else { + msg.note(format!("failed to create or modify file: {e}")); } msg.emit(); } |
