fn check_deprecated_options(matches: &getopts::Matches, diag: &rustc_errors::Handler) {
    let deprecated_flags = ["input-format", "no-defaults", "passes"];

    for flag in deprecated_flags.iter() {
        if matches.opt_present(flag) {
            let mut err = diag.struct_warn(&format!("the `{}` flag is deprecated", flag));
            err.note(
                "see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
                 for more information",
            );

            if *flag == "no-defaults" {
                err.help("you may want to use --document-private-items");
            }

            err.emit();
        }
    }

    let removed_flags = ["plugins", "plugin-path"];

    for &flag in removed_flags.iter() {
        if matches.opt_present(flag) {
            diag.struct_warn(&format!("the '{}' flag no longer functions", flag))
                .warn("see CVE-2018-1000622")
                .emit();
        }
    }
}
/// Prints deprecation warnings for deprecated options
Prints deprecation warnings for deprecated options
Prints deprecation warnings for deprecated options
fn check_deprecated_options(matches: &getopts::Matches, diag: &rustc_errors::Handler) {
    let deprecated_flags = ["input-format", "no-defaults", "passes"];
    for flag in deprecated_flags.iter() {
        if matches.opt_present(flag) {
            let mut err = diag.struct_warn(&format!("the `{}` flag is deprecated", flag));
            err.note(
                "see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
                 for more information",
            );
            if *flag == "no-defaults" {
                err.help("you may want to use --document-private-items");
            }
            err.emit();
        }
    }
    let removed_flags = ["plugins", "plugin-path"];
    for &flag in removed_flags.iter() {
        if matches.opt_present(flag) {
            diag.struct_warn(&format!("the '{}' flag no longer functions", flag))
                .warn("see CVE-2018-1000622")
                .emit();
        }
    }
}
fn check_deprecated_options ( matches : & getopts :: Matches , diag : & rustc_errors :: Handler ) { let deprecated_flags = [ " " , " " , " " ] ; for flag in deprecated_flags . iter ( ) { if matches . opt_present ( flag ) { let mut err = diag . struct_warn ( & format ! ( " " flag ) ) ; err . note ( " \
 " , ) ; if * flag == " " { err . help ( " " ) ; } err . emit ( ) ; } } let removed_flags = [ " " , " " ] ; for & flag in removed_flags . iter ( ) { if matches . opt_present ( flag ) { diag . struct_warn ( & format ! ( " " flag ) ) . warn ( " " ) . emit ( ) ; } } }
Prints deprecation warnings for deprecated options
Prints deprecation warnings for deprecated options
matches
&getopts::Matches
diag
&rustc_errors::Handler
matches
&getopts::Matches
diag
&rustc_errors::Handler