Skip to content

Commit fc1e07e

Browse files
committed
Rename lint to use plural form
1 parent b175642 commit fc1e07e

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ Released 2018-09-13
17541754
[`unnecessary_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
17551755
[`unnecessary_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
17561756
[`unnecessary_fold`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold
1757-
[`unnecessary_lazy_evaluation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluation
1757+
[`unnecessary_lazy_evaluations`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
17581758
[`unnecessary_mut_passed`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
17591759
[`unnecessary_operation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
17601760
[`unnecessary_sort_by`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by

clippy_lints/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
685685
&methods::UNINIT_ASSUMED_INIT,
686686
&methods::UNNECESSARY_FILTER_MAP,
687687
&methods::UNNECESSARY_FOLD,
688-
&methods::UNNECESSARY_LAZY_EVALUATION,
688+
&methods::UNNECESSARY_LAZY_EVALUATIONS,
689689
&methods::UNWRAP_USED,
690690
&methods::USELESS_ASREF,
691691
&methods::WRONG_PUB_SELF_CONVENTION,
@@ -1361,7 +1361,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13611361
LintId::of(&methods::UNINIT_ASSUMED_INIT),
13621362
LintId::of(&methods::UNNECESSARY_FILTER_MAP),
13631363
LintId::of(&methods::UNNECESSARY_FOLD),
1364-
LintId::of(&methods::UNNECESSARY_LAZY_EVALUATION),
1364+
LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
13651365
LintId::of(&methods::USELESS_ASREF),
13661366
LintId::of(&methods::WRONG_SELF_CONVENTION),
13671367
LintId::of(&methods::ZST_OFFSET),
@@ -1542,7 +1542,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15421542
LintId::of(&methods::SINGLE_CHAR_PUSH_STR),
15431543
LintId::of(&methods::STRING_EXTEND_CHARS),
15441544
LintId::of(&methods::UNNECESSARY_FOLD),
1545-
LintId::of(&methods::UNNECESSARY_LAZY_EVALUATION),
1545+
LintId::of(&methods::UNNECESSARY_LAZY_EVALUATIONS),
15461546
LintId::of(&methods::WRONG_SELF_CONVENTION),
15471547
LintId::of(&misc::TOPLEVEL_REF_ARG),
15481548
LintId::of(&misc::ZERO_PTR),

clippy_lints/src/methods/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ declare_clippy_lint! {
13611361
///
13621362
/// opt.unwrap_or(42);
13631363
/// ```
1364-
pub UNNECESSARY_LAZY_EVALUATION,
1364+
pub UNNECESSARY_LAZY_EVALUATIONS,
13651365
style,
13661366
"using unnecessary lazy evaluation, which can be replaced with simpler eager evaluation"
13671367
}
@@ -1415,7 +1415,7 @@ declare_lint_pass!(Methods => [
14151415
ZST_OFFSET,
14161416
FILETYPE_IS_FILE,
14171417
OPTION_AS_REF_DEREF,
1418-
UNNECESSARY_LAZY_EVALUATION,
1418+
UNNECESSARY_LAZY_EVALUATIONS,
14191419
]);
14201420

14211421
impl<'tcx> LateLintPass<'tcx> for Methods {

clippy_lints/src/methods/unnecessary_lazy_eval.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_errors::Applicability;
44
use rustc_hir as hir;
55
use rustc_lint::LateContext;
66

7-
use super::UNNECESSARY_LAZY_EVALUATION;
7+
use super::UNNECESSARY_LAZY_EVALUATIONS;
88

99
// Return true if the expression is an accessor of any of the arguments
1010
fn expr_uses_argument(expr: &hir::Expr<'_>, params: &[hir::Param<'_>]) -> bool {
@@ -93,7 +93,7 @@ pub(super) fn lint<'tcx>(
9393

9494
span_lint_and_sugg(
9595
cx,
96-
UNNECESSARY_LAZY_EVALUATION,
96+
UNNECESSARY_LAZY_EVALUATIONS,
9797
expr.span,
9898
msg,
9999
&format!("Use `{}` instead", simplify_using),

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
23842384
module: "methods",
23852385
},
23862386
Lint {
2387-
name: "unnecessary_lazy_evaluation",
2387+
name: "unnecessary_lazy_evaluations",
23882388
group: "style",
23892389
desc: "using unnecessary lazy evaluation, which can be replaced with simpler eager evaluation",
23902390
deprecation: None,

tests/ui/unnecessary_lazy_eval.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::unnecessary_lazy_evaluation)]
2+
#![warn(clippy::unnecessary_lazy_evaluations)]
33
#![allow(clippy::redundant_closure)]
44
#![allow(clippy::bind_instead_of_map)]
55

tests/ui/unnecessary_lazy_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::unnecessary_lazy_evaluation)]
2+
#![warn(clippy::unnecessary_lazy_evaluations)]
33
#![allow(clippy::redundant_closure)]
44
#![allow(clippy::bind_instead_of_map)]
55

tests/ui/unnecessary_lazy_eval.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unnecessary closure used to substitute value for `Option::None`
44
LL | let _ = opt.unwrap_or_else(|| 2);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: Use `unwrap_or` instead: `opt.unwrap_or(2)`
66
|
7-
= note: `-D clippy::unnecessary-lazy-evaluation` implied by `-D warnings`
7+
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
88

99
error: unnecessary closure used to substitute value for `Option::None`
1010
--> $DIR/unnecessary_lazy_eval.rs:35:13

0 commit comments

Comments
 (0)