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:
commit
43e25751ff
34 changed files with 43 additions and 43 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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`",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue