Add deprecation warning for --passes

This commit is contained in:
Shivani Bhardwaj 2021-12-09 23:05:08 +05:30
parent 3b263ceb5c
commit 258fd8974e

View File

@ -327,6 +327,19 @@ impl Options {
return Err(0);
}
let color = config::parse_color(matches);
let config::JsonConfig { json_rendered, json_unused_externs, .. } =
config::parse_json(matches);
let error_format = config::parse_error_format(matches, color, json_rendered);
let codegen_options = CodegenOptions::build(matches, error_format);
let debugging_opts = DebuggingOptions::build(matches, error_format);
let diag = new_handler(error_format, None, &debugging_opts);
// check for deprecated options
check_deprecated_options(matches, &diag);
if matches.opt_strs("passes") == ["list"] {
println!("Available passes for running rustdoc:");
for pass in passes::PASSES {
@ -359,19 +372,6 @@ fn println_condition(condition: Condition) {
return Err(0);
}
let color = config::parse_color(matches);
let config::JsonConfig { json_rendered, json_unused_externs, .. } =
config::parse_json(matches);
let error_format = config::parse_error_format(matches, color, json_rendered);
let codegen_options = CodegenOptions::build(matches, error_format);
let debugging_opts = DebuggingOptions::build(matches, error_format);
let diag = new_handler(error_format, None, &debugging_opts);
// check for deprecated options
check_deprecated_options(matches, &diag);
let mut emit = Vec::new();
for list in matches.opt_strs("emit") {
for kind in list.split(',') {