diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 2e54a22840bb..e4549796b3e8 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -730,6 +730,7 @@ impl Options { let extern_html_root_takes_precedence = matches.opt_present("extern-html-root-takes-precedence"); 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", diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 8e72dd6a864a..0ed8921b1e8d 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -722,7 +722,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { ); shared.fs.write(help_file, v)?; - // if to avoid writing files to doc root unless we're on the final invocation if shared.layout.scrape_examples_extension { page.title = "About scraped examples"; page.description = "How the scraped examples feature works in Rustdoc";