about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDániel Buga <bugadani@gmail.com>2020-08-16 22:16:39 +0200
committerDániel Buga <bugadani@gmail.com>2020-08-16 22:16:39 +0200
commitfc1e07e0c1803edb3ade2db2f46034cf227642c9 (patch)
treed376afd9478e7ab0ea3140689b8be57fdf95b5e8
parentb175642a85f5d1507b35b8ef269ecbdaef9aa27d (diff)
downloadrust-fc1e07e0c1803edb3ade2db2f46034cf227642c9.tar.gz
rust-fc1e07e0c1803edb3ade2db2f46034cf227642c9.zip
Rename lint to use plural form
-rw-r--r--CHANGELOG.md2
-rw-r--r--clippy_lints/src/lib.rs6
-rw-r--r--clippy_lints/src/methods/mod.rs4
-rw-r--r--clippy_lints/src/methods/unnecessary_lazy_eval.rs4
-rw-r--r--src/lintlist/mod.rs2
-rw-r--r--tests/ui/unnecessary_lazy_eval.fixed2
-rw-r--r--tests/ui/unnecessary_lazy_eval.rs2
-rw-r--r--tests/ui/unnecessary_lazy_eval.stderr2
8 files changed, 12 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 675dfd420a7..f662de122f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1754,7 +1754,7 @@ Released 2018-09-13
 [`unnecessary_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
 [`unnecessary_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
 [`unnecessary_fold`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold
-[`unnecessary_lazy_evaluation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluation
+[`unnecessary_lazy_evaluations`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
 [`unnecessary_mut_passed`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
 [`unnecessary_operation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
 [`unnecessary_sort_by`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index ae7045884f7..17501e8e6da 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -685,7 +685,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         &methods::UNINIT_ASSUMED_INIT,
         &methods::UNNECESSARY_FILTER_MAP,
         &methods::UNNECESSARY_FOLD,
-        &methods::UNNECESSARY_LAZY_EVALUATION,
+        &methods::UNNECESSARY_LAZY_EVALUATIONS,
         &methods::UNWRAP_USED,
         &methods::USELESS_ASREF,
         &methods::WRONG_PUB_SELF_CONVENTION,
@@ -1361,7 +1361,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&methods::UNINIT_ASSUMED_INIT),
         LintId::of(&methods::UNNECESSARY_FILTER_MAP),
         LintId::of(&methods::UNNECESSARY_FOLD),
-        LintId::of(&methods::UNNECESSARY_LAZY_EVALUATION),
+        LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
         LintId::of(&methods::USELESS_ASREF),
         LintId::of(&methods::WRONG_SELF_CONVENTION),
         LintId::of(&methods::ZST_OFFSET),
@@ -1542,7 +1542,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
         LintId::of(&methods::SINGLE_CHAR_PUSH_STR),
         LintId::of(&methods::STRING_EXTEND_CHARS),
         LintId::of(&methods::UNNECESSARY_FOLD),
-        LintId::of(&methods::UNNECESSARY_LAZY_EVALUATION),
+        LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
         LintId::of(&methods::WRONG_SELF_CONVENTION),
         LintId::of(&misc::TOPLEVEL_REF_ARG),
         LintId::of(&misc::ZERO_PTR),
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index c2b2cb98012..0f50a4c813a 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -1361,7 +1361,7 @@ declare_clippy_lint! {
     ///
     /// opt.unwrap_or(42);
     /// ```
-    pub UNNECESSARY_LAZY_EVALUATION,
+    pub UNNECESSARY_LAZY_EVALUATIONS,
     style,
     "using unnecessary lazy evaluation, which can be replaced with simpler eager evaluation"
 }
@@ -1415,7 +1415,7 @@ declare_lint_pass!(Methods => [
     ZST_OFFSET,
     FILETYPE_IS_FILE,
     OPTION_AS_REF_DEREF,
-    UNNECESSARY_LAZY_EVALUATION,
+    UNNECESSARY_LAZY_EVALUATIONS,
 ]);
 
 impl<'tcx> LateLintPass<'tcx> for Methods {
diff --git a/clippy_lints/src/methods/unnecessary_lazy_eval.rs b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
index a3e7e9971f8..31517659c34 100644
--- a/clippy_lints/src/methods/unnecessary_lazy_eval.rs
+++ b/clippy_lints/src/methods/unnecessary_lazy_eval.rs
@@ -4,7 +4,7 @@ use rustc_errors::Applicability;
 use rustc_hir as hir;
 use rustc_lint::LateContext;
 
-use super::UNNECESSARY_LAZY_EVALUATION;
+use super::UNNECESSARY_LAZY_EVALUATIONS;
 
 // Return true if the expression is an accessor of any of the arguments
 fn expr_uses_argument(expr: &hir::Expr<'_>, params: &[hir::Param<'_>]) -> bool {
@@ -93,7 +93,7 @@ pub(super) fn lint<'tcx>(
 
                 span_lint_and_sugg(
                     cx,
-                    UNNECESSARY_LAZY_EVALUATION,
+                    UNNECESSARY_LAZY_EVALUATIONS,
                     expr.span,
                     msg,
                     &format!("Use `{}` instead", simplify_using),
diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs
index 2a66d3495ed..3229c8da507 100644
--- a/src/lintlist/mod.rs
+++ b/src/lintlist/mod.rs
@@ -2384,7 +2384,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
         module: "methods",
     },
     Lint {
-        name: "unnecessary_lazy_evaluation",
+        name: "unnecessary_lazy_evaluations",
         group: "style",
         desc: "using unnecessary lazy evaluation, which can be replaced with simpler eager evaluation",
         deprecation: None,
diff --git a/tests/ui/unnecessary_lazy_eval.fixed b/tests/ui/unnecessary_lazy_eval.fixed
index 7f9d90a8569..fa66e68794e 100644
--- a/tests/ui/unnecessary_lazy_eval.fixed
+++ b/tests/ui/unnecessary_lazy_eval.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::unnecessary_lazy_evaluation)]
+#![warn(clippy::unnecessary_lazy_evaluations)]
 #![allow(clippy::redundant_closure)]
 #![allow(clippy::bind_instead_of_map)]
 
diff --git a/tests/ui/unnecessary_lazy_eval.rs b/tests/ui/unnecessary_lazy_eval.rs
index fd8f8ed0329..04f47d1aa29 100644
--- a/tests/ui/unnecessary_lazy_eval.rs
+++ b/tests/ui/unnecessary_lazy_eval.rs
@@ -1,5 +1,5 @@
 // run-rustfix
-#![warn(clippy::unnecessary_lazy_evaluation)]
+#![warn(clippy::unnecessary_lazy_evaluations)]
 #![allow(clippy::redundant_closure)]
 #![allow(clippy::bind_instead_of_map)]
 
diff --git a/tests/ui/unnecessary_lazy_eval.stderr b/tests/ui/unnecessary_lazy_eval.stderr
index e86b7ed6253..5c1b2eb1f14 100644
--- a/tests/ui/unnecessary_lazy_eval.stderr
+++ b/tests/ui/unnecessary_lazy_eval.stderr
@@ -4,7 +4,7 @@ error: unnecessary closure used to substitute value for `Option::None`
 LL |     let _ = opt.unwrap_or_else(|| 2);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `opt.unwrap_or(2)`
    |
-   = note: `-D clippy::unnecessary-lazy-evaluation` implied by `-D warnings`
+   = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
 
 error: unnecessary closure used to substitute value for `Option::None`
   --> $DIR/unnecessary_lazy_eval.rs:35:13