diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-08-13 15:07:26 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-08-13 15:07:26 +0200 |
| commit | d2177d90b04e7af7d52279fe4664002f1e2a9c58 (patch) | |
| tree | 66a2c8e21fa72de684bdae99360dda86310db083 | |
| parent | 53e87d211ca314c5e3e664ef254bd20d134c9a00 (diff) | |
| download | rust-d2177d90b04e7af7d52279fe4664002f1e2a9c58.tar.gz rust-d2177d90b04e7af7d52279fe4664002f1e2a9c58.zip | |
Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML
| -rw-r--r-- | src/librustdoc/config.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 9c7a9f8467f..d599fead266 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -733,9 +733,11 @@ impl Options { let html_no_source = matches.opt_present("html-no-source"); if generate_link_to_definition && (show_coverage || output_format != OutputFormat::Html) { - dcx.fatal( - "--generate-link-to-definition option can only be used with HTML output format", - ); + dcx.struct_warn( + "`--generate-link-to-definition` option can only be used with HTML output format", + ) + .with_note("`--generate-link-to-definition` option will be ignored") + .emit(); } let scrape_examples_options = ScrapeExamplesOptions::new(matches, dcx); |
