Skip to content

Rollup of 7 pull requests #91792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Dec 11, 2021
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add deprecation warning for --passes
  • Loading branch information
inashivb committed Dec 9, 2021
commit 258fd8974e66ae4e5bb243954bcf856ddd9204d4
26 changes: 13 additions & 13 deletions src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -359,19 +372,6 @@ 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);

let mut emit = Vec::new();
for list in matches.opt_strs("emit") {
for kind in list.split(',') {
Expand Down