Skip to content

Commit d2177d9

Browse files
Emit a warning instead of an error if --generate-link-to-definition is used with other output formats than HTML
1 parent 53e87d2 commit d2177d9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/librustdoc/config.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,11 @@ impl Options {
733733
let html_no_source = matches.opt_present("html-no-source");
734734

735735
if generate_link_to_definition && (show_coverage || output_format != OutputFormat::Html) {
736-
dcx.fatal(
737-
"--generate-link-to-definition option can only be used with HTML output format",
738-
);
736+
dcx.struct_warn(
737+
"`--generate-link-to-definition` option can only be used with HTML output format",
738+
)
739+
.with_note("`--generate-link-to-definition` option will be ignored")
740+
.emit();
739741
}
740742

741743
let scrape_examples_options = ScrapeExamplesOptions::new(matches, dcx);

0 commit comments

Comments
 (0)