Skip to content

Commit 800c5f9

Browse files
committed
Rename force-warns to force-warn
1 parent da7d405 commit 800c5f9

34 files changed

+43
-43
lines changed

compiler/rustc_lint/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl LintStore {
370370
match level {
371371
Level::Allow => "-A",
372372
Level::Warn => "-W",
373-
Level::ForceWarn => "--force-warns",
373+
Level::ForceWarn => "--force-warn",
374374
Level::Deny => "-D",
375375
Level::Forbid => "-F",
376376
},

compiler/rustc_lint_defs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Level {
6464
match self {
6565
Level::Allow => "allow",
6666
Level::Warn => "warn",
67-
Level::ForceWarn => "force-warns",
67+
Level::ForceWarn => "force-warn",
6868
Level::Deny => "deny",
6969
Level::Forbid => "forbid",
7070
}

compiler/rustc_middle/src/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ pub fn struct_lint_level<'s, 'd>(
288288
Level::Deny => "-D",
289289
Level::Forbid => "-F",
290290
Level::Allow => "-A",
291-
Level::ForceWarn => "--force-warns",
291+
Level::ForceWarn => "--force-warn",
292292
};
293293
let hyphen_case_lint_name = name.replace("_", "-");
294294
if lint_flag_val.as_str() == name {

compiler/rustc_session/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
11011101
),
11021102
opt::multi_s(
11031103
"",
1104-
"force-warns",
1104+
"force-warn",
11051105
"Specifiy lints that should warn even if \
11061106
they are allowed somewhere else",
11071107
"LINT",
@@ -1175,11 +1175,11 @@ pub fn get_cmd_lint_options(
11751175
let mut lint_opts_with_position = vec![];
11761176
let mut describe_lints = false;
11771177

1178-
if !debugging_opts.unstable_options && matches.opt_present("force-warns") {
1178+
if !debugging_opts.unstable_options && matches.opt_present("force-warn") {
11791179
early_error(
11801180
error_format,
11811181
"the `-Z unstable-options` flag must also be passed to enable \
1182-
the flag `--force-warns=lints`",
1182+
the flag `--force-warn=lints`",
11831183
);
11841184
}
11851185

src/doc/unstable-book/src/compiler-flags/force-warns.md renamed to src/doc/unstable-book/src/compiler-flags/force-warn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# `force-warns`
1+
# `force-warn`
22

33
The tracking issue for this feature is: [#85512](https://github.com/rust-lang/rust/issues/85512).
44

55
------------------------
66

7-
This feature allows you to cause any lint to produce a warning even if the lint has a different level by default or another level is set somewhere else. For instance, the `force-warns` option can be used to make a lint (e.g., `dead_code`) produce a warning even if that lint is allowed in code with `#![allow(dead_code)]`.
7+
This feature allows you to cause any lint to produce a warning even if the lint has a different level by default or another level is set somewhere else. For instance, the `force-warn` option can be used to make a lint (e.g., `dead_code`) produce a warning even if that lint is allowed in code with `#![allow(dead_code)]`.
88

99
## Example
1010

@@ -18,4 +18,4 @@ fn dead_function() {}
1818
fn main() {}
1919
```
2020

21-
We can force a warning to be produced by providing `--force-warns dead_code` to rustc.
21+
We can force a warning to be produced by providing `--force-warn dead_code` to rustc.

src/librustdoc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,10 @@ fn opts() -> Vec<RustcOptGroup> {
511511
"LEVEL",
512512
)
513513
}),
514-
unstable("force-warns", |o| {
514+
unstable("force-warn", |o| {
515515
o.optopt(
516516
"",
517-
"force-warns",
517+
"force-warn",
518518
"Lints that will warn even if allowed somewhere else",
519519
"LINTS",
520520
)

src/test/run-make/unstable-flag-required/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
all:
44
$(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr
5-
$(RUSTC) --force-warns dead_code x.rs 2>&1 | diff - force-warns.stderr
5+
$(RUSTC) --force-warn dead_code x.rs 2>&1 | diff - force-warn.stderr
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
error: the `-Z unstable-options` flag must also be passed to enable the flag `--force-warns=lints`
1+
error: the `-Z unstable-options` flag must also be passed to enable the flag `--force-warn=lints`
22

src/test/ui/lint/cli-lint-override.force_warn_deny.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: extern declarations without an explicit ABI are deprecated
44
LL | extern fn foo() {}
55
| ^^^^^^^^^^^^^^^ ABI should be specified here
66
|
7-
= note: requested on the command line with `--force-warns missing-abi`
7+
= note: requested on the command line with `--force-warn missing-abi`
88
= help: the default ABI is C
99

1010
warning: 1 warning emitted

src/test/ui/lint/cli-lint-override.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66
//[warn_deny] compile-flags: --warn missing_abi --deny missing_abi
77
//[forbid_warn] compile-flags: --warn missing_abi --forbid missing_abi
8-
//[force_warn_deny] compile-flags: -Z unstable-options --force-warns missing_abi --allow missing_abi
8+
//[force_warn_deny] compile-flags: -Z unstable-options --force-warn missing_abi --allow missing_abi
99
//[force_warn_deny] check-pass
1010

1111

0 commit comments

Comments
 (0)