about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-07-21 10:12:30 -0700
committerGitHub <noreply@github.com>2021-07-21 10:12:30 -0700
commit43e25751ff6f20941bef019bdb10bce32af8f178 (patch)
treebb1f1d4339aa9d223e1c4053d8c773f00069bc07 /compiler
parentb9e3f3d5a21a24bf91e34a649896092dbad83a38 (diff)
parent800c5f9202ca5309bbe372bbb8f2d6f1c29e59a5 (diff)
downloadrust-43e25751ff6f20941bef019bdb10bce32af8f178.tar.gz
rust-43e25751ff6f20941bef019bdb10bce32af8f178.zip
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?
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/src/context.rs2
-rw-r--r--compiler/rustc_lint_defs/src/lib.rs2
-rw-r--r--compiler/rustc_middle/src/lint.rs2
-rw-r--r--compiler/rustc_session/src/config.rs6
4 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs
index c16d46efb88..f448acd24fc 100644
--- a/compiler/rustc_lint/src/context.rs
+++ b/compiler/rustc_lint/src/context.rs
@@ -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",
                 },
diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs
index 4d85bf6b499..4190e769976 100644
--- a/compiler/rustc_lint_defs/src/lib.rs
+++ b/compiler/rustc_lint_defs/src/lib.rs
@@ -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",
         }
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs
index 848e60fe134..6ad68877235 100644
--- a/compiler/rustc_middle/src/lint.rs
+++ b/compiler/rustc_middle/src/lint.rs
@@ -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 {
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 9e5a38b8dc0..2d7f5f9b321 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -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`",
         );
     }