Rollup merge of #87346 - rylev:rename-force-warn, r=nikomatsakis

Rename force-warns to force-warn

The renames the `--force-warns` option to `--force-warn`. This mirrors other lint options like `--warn` and `--deny` which are in the singular.

r? `@nikomatsakis`

cc `@ehuss` - this option is being used by Cargo. How do we make sure the transition to using the new name is as smooth as possible?
This commit is contained in:
Eric Huss 2021-07-21 10:12:30 -07:00 committed by GitHub
commit 43e25751ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 43 additions and 43 deletions

View file

@ -370,7 +370,7 @@ impl LintStore {
match level {
Level::Allow => "-A",
Level::Warn => "-W",
Level::ForceWarn => "--force-warns",
Level::ForceWarn => "--force-warn",
Level::Deny => "-D",
Level::Forbid => "-F",
},

View file

@ -64,7 +64,7 @@ impl Level {
match self {
Level::Allow => "allow",
Level::Warn => "warn",
Level::ForceWarn => "force-warns",
Level::ForceWarn => "force-warn",
Level::Deny => "deny",
Level::Forbid => "forbid",
}

View file

@ -288,7 +288,7 @@ pub fn struct_lint_level<'s, 'd>(
Level::Deny => "-D",
Level::Forbid => "-F",
Level::Allow => "-A",
Level::ForceWarn => "--force-warns",
Level::ForceWarn => "--force-warn",
};
let hyphen_case_lint_name = name.replace("_", "-");
if lint_flag_val.as_str() == name {

View file

@ -1101,7 +1101,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
),
opt::multi_s(
"",
"force-warns",
"force-warn",
"Specifiy lints that should warn even if \
they are allowed somewhere else",
"LINT",
@ -1175,11 +1175,11 @@ pub fn get_cmd_lint_options(
let mut lint_opts_with_position = vec![];
let mut describe_lints = false;
if !debugging_opts.unstable_options && matches.opt_present("force-warns") {
if !debugging_opts.unstable_options && matches.opt_present("force-warn") {
early_error(
error_format,
"the `-Z unstable-options` flag must also be passed to enable \
the flag `--force-warns=lints`",
the flag `--force-warn=lints`",
);
}