Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --I tried this command: I expected to see this happen: rustdoc shows a warning, the way it does for any other value you pass to : Instead, this happened: Rustdoc gives no warning and lists all passes. <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Mentoring instructions: Move this check earlier to before is processed:
claim

Discussion:
return Err(0); } <ins> 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); </ins> if matches.opt_strs("passes") == ["list"] { println!("Available passes for running rustdoc:"); for pass in passes::PASSES {

return Err(0); } <del> 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); </del> let mut emit = Vec::new(); for list in matches.opt_strs("emit") { for kind in list.split(',') {

<ins> // check-pass // compile-flags: --passes list // error-pattern: the `passes` flag is deprecated </ins>

<ins> warning: the `passes` flag is deprecated | = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information </ins>

<ins> Available passes for running rustdoc: check_doc_test_visibility - run various visibility-related lints on doctests strip-hidden - strips all `#[doc(hidden)]` items from the output unindent-comments - removes excess indentation on comments in order for markdown to like it strip-private - strips all private items from a crate which cannot be seen externally, implies strip-priv-imports strip-priv-imports - strips all private import statements (`use`, `extern crate`) from a crate propagate-doc-cfg - propagates `#[doc(cfg(...))]` to child items collect-intra-doc-links - resolves intra-doc links check-code-block-syntax - validates syntax inside Rust code blocks collect-trait-impls - retrieves trait impls for items in the crate calculate-doc-coverage - counts the number of items with and without documentation check-invalid-html-tags - detects invalid HTML tags in doc comments check-bare-urls - detects URLs that are not hyperlinks Default passes for rustdoc: collect-trait-impls unindent-comments check_doc_test_visibility strip-hidden  (when not --document-hidden-items) strip-private  (when not --document-private-items) strip-priv-imports  (when --document-private-items) collect-intra-doc-links check-code-block-syntax check-invalid-html-tags propagate-doc-cfg check-bare-urls Passes run with `--show-coverage`: strip-hidden  (when not --document-hidden-items) strip-private  (when not --document-private-items) calculate-doc-coverage </ins>