You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"json" => " (see https://github.com./rust-lang/rust/issues/76578)",
458
-
"doctest" => " (see https://github.com./rust-lang/rust/issues/134529)",
459
-
_ => "",
460
-
};
461
-
dcx.fatal(
462
-
format!(
463
-
"the -Z unstable-options flag must be passed to enable --output-format for documentation generation{extra}",
464
-
),
465
-
);
468
+
match(
469
+
output_format_s.as_ref().map(|_| output_format),
470
+
show_coverage,
471
+
nightly_options::is_unstable_enabled(matches),
472
+
){
473
+
(None | Some(OutputFormat::Json),true, _) => {}
474
+
(_,true, _) => {
475
+
dcx.fatal(format!(
476
+
"`--output-format={}` is not supported for the `--show-coverage` option",
477
+
output_format_s.unwrap_or_default(),
478
+
));
479
+
}
480
+
// If `-Zunstable-options` is used, nothing to check after this point.
481
+
(_,false,true) => {}
482
+
(None | Some(OutputFormat::Html),false, _) => {}
483
+
(Some(OutputFormat::Json),false,false) => {
484
+
dcx.fatal(
485
+
"the -Z unstable-options flag must be passed to enable --output-format for documentation generation (see https://github.com./rust-lang/rust/issues/76578)",
486
+
);
487
+
}
488
+
(Some(OutputFormat::Doctest),false,false) => {
489
+
dcx.fatal(
490
+
"the -Z unstable-options flag must be passed to enable --output-format for documentation generation (see https://github.com./rust-lang/rust/issues/134529)",
491
+
);
492
+
}
466
493
}
467
494
468
495
let to_check = matches.opt_strs("check-theme");
@@ -714,29 +741,13 @@ impl Options {
714
741
})
715
742
.collect();
716
743
717
-
let show_coverage = matches.opt_present("show-coverage");
718
-
719
744
let crate_types = matchparse_crate_types_from_list(matches.opt_strs("crate-type")){
720
745
Ok(types) => types,
721
746
Err(e) => {
722
747
dcx.fatal(format!("unknown crate type: {e}"));
723
748
}
724
749
};
725
750
726
-
let output_format = match matches.opt_str("output-format"){
0 commit comments