Skip to content

Commit ab87f87

Browse files
committed
Fix CHANGELOG.md and lint names plural
1 parent 9338656 commit ab87f87

12 files changed

+57
-57
lines changed

CHANGELOG.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Released 2020-03-12
198198

199199
### Suggestion Improvements
200200

201-
* [`option_map_unwrap_or`] [#4634](https://github.com/rust-lang/rust-clippy/pull/4634)
201+
* `option_map_unwrap_or` [#4634](https://github.com/rust-lang/rust-clippy/pull/4634)
202202
* [`wildcard_enum_match_arm`] [#4934](https://github.com/rust-lang/rust-clippy/pull/4934)
203203
* [`cognitive_complexity`] [#4935](https://github.com/rust-lang/rust-clippy/pull/4935)
204204
* [`decimal_literal_representation`] [#4956](https://github.com/rust-lang/rust-clippy/pull/4956)
@@ -282,8 +282,8 @@ Released 2019-12-19
282282
* [`panic`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
283283
* [`unreachable`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
284284
* [`todo`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
285-
* [`option_expect_used`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
286-
* [`result_expect_used`] [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
285+
* `option_expect_used` [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
286+
* `result_expect_used` [#4657](https://github.com/rust-lang/rust-clippy/pull/4657)
287287
* Move `redundant_clone` to perf group [#4509](https://github.com/rust-lang/rust-clippy/pull/4509)
288288
* Move `manual_mul_add` to nursery group [#4736](https://github.com/rust-lang/rust-clippy/pull/4736)
289289
* Expand `unit_cmp` to also work with `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` [#4613](https://github.com/rust-lang/rust-clippy/pull/4613)
@@ -395,7 +395,7 @@ Released 2019-08-15
395395
* Fix false positive in [`useless_attribute`] [#4107](https://github.com/rust-lang/rust-clippy/pull/4107)
396396
* Fix incorrect suggestion for [`float_cmp`] [#4214](https://github.com/rust-lang/rust-clippy/pull/4214)
397397
* Add suggestions for [`print_with_newline`] and [`write_with_newline`] [#4136](https://github.com/rust-lang/rust-clippy/pull/4136)
398-
* Improve suggestions for [`option_map_unwrap_or_else`] and [`result_map_unwrap_or_else`] [#4164](https://github.com/rust-lang/rust-clippy/pull/4164)
398+
* Improve suggestions for `option_map_unwrap_or_else` and `result_map_unwrap_or_else` [#4164](https://github.com/rust-lang/rust-clippy/pull/4164)
399399
* Improve suggestions for [`non_ascii_literal`] [#4119](https://github.com/rust-lang/rust-clippy/pull/4119)
400400
* Improve diagnostics for [`let_and_return`] [#4137](https://github.com/rust-lang/rust-clippy/pull/4137)
401401
* Improve diagnostics for [`trivially_copy_pass_by_ref`] [#4071](https://github.com/rust-lang/rust-clippy/pull/4071)
@@ -448,7 +448,7 @@ Released 2019-05-20
448448
* Fix false positive in [`needless_range_loop`] pertaining to structs without a `.iter()`
449449
* Fix false positive in [`bool_comparison`] pertaining to non-bool types
450450
* Fix false positive in [`redundant_closure`] pertaining to differences in borrows
451-
* Fix false positive in [`option_map_unwrap_or`] on non-copy types
451+
* Fix false positive in `option_map_unwrap_or` on non-copy types
452452
* Fix false positives in [`missing_const_for_fn`] pertaining to macros and trait method impls
453453
* Fix false positive in [`needless_pass_by_value`] pertaining to procedural macros
454454
* Fix false positive in [`needless_continue`] pertaining to loop labels
@@ -794,7 +794,7 @@ Released 2018-09-13
794794

795795
## 0.0.169
796796
* Rustup to *rustc 1.23.0-nightly (3b82e4c74 2017-11-05)*
797-
* New lints: [`just_underscores_and_digits`], [`result_map_unwrap_or_else`], [`transmute_bytes_to_str`]
797+
* New lints: [`just_underscores_and_digits`], `result_map_unwrap_or_else`, [`transmute_bytes_to_str`]
798798

799799
## 0.0.168
800800
* Rustup to *rustc 1.23.0-nightly (f0fe716db 2017-10-30)*
@@ -1068,7 +1068,7 @@ Released 2018-09-13
10681068

10691069
## 0.0.93 — 2016-10-03
10701070
* Rustup to *rustc 1.14.0-nightly (144af3e97 2016-10-02)*
1071-
* [`option_map_unwrap_or`] and [`option_map_unwrap_or_else`] are now
1071+
* `option_map_unwrap_or` and `option_map_unwrap_or_else` are now
10721072
allowed by default.
10731073
* New lint: [`explicit_into_iter_loop`]
10741074

@@ -1087,8 +1087,8 @@ Released 2018-09-13
10871087
## 0.0.88 — 2016-09-04
10881088
* Rustup to *rustc 1.13.0-nightly (70598e04f 2016-09-03)*
10891089
* The following lints are not new but were only usable through the `clippy`
1090-
lint groups: [`filter_next`], [`for_loop_over_option`],
1091-
[`for_loop_over_result`] and [`match_overlapping_arm`]. You should now be
1090+
lint groups: [`filter_next`], `for_loop_over_option`,
1091+
`for_loop_over_result` and [`match_overlapping_arm`]. You should now be
10921092
able to `#[allow/deny]` them individually and they are available directly
10931093
through `cargo clippy`.
10941094

@@ -1274,7 +1274,7 @@ Released 2018-09-13
12741274
[`await_holding_lock`]: https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
12751275
[`bad_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
12761276
[`blacklisted_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name
1277-
[`block_in_if_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition
1277+
[`blocks_in_if_conditions`]: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
12781278
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
12791279
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
12801280
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
@@ -1361,7 +1361,7 @@ Released 2018-09-13
13611361
[`fn_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast
13621362
[`fn_to_numeric_cast_with_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_with_truncation
13631363
[`for_kv_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
1364-
[`for_loop_over_fallible`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loop_over_fallible
1364+
[`for_loops_over_fallibles`]: https://rust-lang.github.io/rust-clippy/master/index.html#for_loops_over_fallibles
13651365
[`forget_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_copy
13661366
[`forget_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref
13671367
[`future_not_send`]: https://rust-lang.github.io/rust-clippy/master/index.html#future_not_send

clippy_lints/src/block_in_if_condition.rs renamed to clippy_lints/src/blocks_in_if_conditions.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ declare_clippy_lint! {
3636
/// let res = { let x = somefunc(); x };
3737
/// if res { /* ... */ }
3838
/// ```
39-
pub BLOCK_IN_IF_CONDITION,
39+
pub BLOCKS_IN_IF_CONDITIONS,
4040
style,
4141
"useless or complex blocks that can be eliminated in conditions"
4242
}
4343

44-
declare_lint_pass!(BlockInIfCondition => [BLOCK_IN_IF_CONDITION]);
44+
declare_lint_pass!(BlocksInIfConditions => [BLOCKS_IN_IF_CONDITIONS]);
4545

4646
struct ExVisitor<'a, 'tcx> {
4747
found_block: Option<&'tcx Expr<'tcx>>,
@@ -71,7 +71,7 @@ const BRACED_EXPR_MESSAGE: &str = "omit braces around single expression conditio
7171
const COMPLEX_BLOCK_MESSAGE: &str = "in an `if` condition, avoid complex blocks or closures with blocks; \
7272
instead, move the block or closure higher and bind it with a `let`";
7373

74-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
74+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlocksInIfConditions {
7575
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
7676
if in_external_macro(cx.sess(), expr.span) {
7777
return;
@@ -89,7 +89,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
8989
let mut applicability = Applicability::MachineApplicable;
9090
span_lint_and_sugg(
9191
cx,
92-
BLOCK_IN_IF_CONDITION,
92+
BLOCKS_IN_IF_CONDITIONS,
9393
cond.span,
9494
BRACED_EXPR_MESSAGE,
9595
"try",
@@ -115,7 +115,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
115115
let mut applicability = Applicability::MachineApplicable;
116116
span_lint_and_sugg(
117117
cx,
118-
BLOCK_IN_IF_CONDITION,
118+
BLOCKS_IN_IF_CONDITIONS,
119119
expr.span.with_hi(cond.span.hi()),
120120
COMPLEX_BLOCK_MESSAGE,
121121
"try",
@@ -137,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
137137
let mut visitor = ExVisitor { found_block: None, cx };
138138
walk_expr(&mut visitor, cond);
139139
if let Some(block) = visitor.found_block {
140-
span_lint(cx, BLOCK_IN_IF_CONDITION, block.span, COMPLEX_BLOCK_MESSAGE);
140+
span_lint(cx, BLOCKS_IN_IF_CONDITIONS, block.span, COMPLEX_BLOCK_MESSAGE);
141141
}
142142
}
143143
}

clippy_lints/src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ mod attrs;
180180
mod await_holding_lock;
181181
mod bit_mask;
182182
mod blacklisted_name;
183-
mod block_in_if_condition;
183+
mod blocks_in_if_conditions;
184184
mod booleans;
185185
mod bytecount;
186186
mod cargo_common_metadata;
@@ -507,7 +507,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
507507
&bit_mask::INEFFECTIVE_BIT_MASK,
508508
&bit_mask::VERBOSE_BIT_MASK,
509509
&blacklisted_name::BLACKLISTED_NAME,
510-
&block_in_if_condition::BLOCK_IN_IF_CONDITION,
510+
&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS,
511511
&booleans::LOGIC_BUG,
512512
&booleans::NONMINIMAL_BOOL,
513513
&bytecount::NAIVE_BYTECOUNT,
@@ -615,7 +615,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
615615
&loops::EXPLICIT_INTO_ITER_LOOP,
616616
&loops::EXPLICIT_ITER_LOOP,
617617
&loops::FOR_KV_MAP,
618-
&loops::FOR_LOOP_OVER_FALLIBLE,
618+
&loops::FOR_LOOPS_OVER_FALLIBLES,
619619
&loops::ITER_NEXT_LOOP,
620620
&loops::MANUAL_MEMCPY,
621621
&loops::MUT_RANGE_BOUND,
@@ -894,7 +894,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
894894
store.register_late_pass(|| box mut_reference::UnnecessaryMutPassed);
895895
store.register_late_pass(|| box len_zero::LenZero);
896896
store.register_late_pass(|| box attrs::Attributes);
897-
store.register_late_pass(|| box block_in_if_condition::BlockInIfCondition);
897+
store.register_late_pass(|| box blocks_in_if_conditions::BlocksInIfConditions);
898898
store.register_late_pass(|| box unicode::Unicode);
899899
store.register_late_pass(|| box strings::StringAdd);
900900
store.register_late_pass(|| box implicit_return::ImplicitReturn);
@@ -1199,7 +1199,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
11991199
LintId::of(&bit_mask::INEFFECTIVE_BIT_MASK),
12001200
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
12011201
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
1202-
LintId::of(&block_in_if_condition::BLOCK_IN_IF_CONDITION),
1202+
LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
12031203
LintId::of(&booleans::LOGIC_BUG),
12041204
LintId::of(&booleans::NONMINIMAL_BOOL),
12051205
LintId::of(&bytecount::NAIVE_BYTECOUNT),
@@ -1264,7 +1264,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12641264
LintId::of(&loops::EMPTY_LOOP),
12651265
LintId::of(&loops::EXPLICIT_COUNTER_LOOP),
12661266
LintId::of(&loops::FOR_KV_MAP),
1267-
LintId::of(&loops::FOR_LOOP_OVER_FALLIBLE),
1267+
LintId::of(&loops::FOR_LOOPS_OVER_FALLIBLES),
12681268
LintId::of(&loops::ITER_NEXT_LOOP),
12691269
LintId::of(&loops::MANUAL_MEMCPY),
12701270
LintId::of(&loops::MUT_RANGE_BOUND),
@@ -1444,7 +1444,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
14441444
LintId::of(&attrs::UNKNOWN_CLIPPY_LINTS),
14451445
LintId::of(&bit_mask::VERBOSE_BIT_MASK),
14461446
LintId::of(&blacklisted_name::BLACKLISTED_NAME),
1447-
LintId::of(&block_in_if_condition::BLOCK_IN_IF_CONDITION),
1447+
LintId::of(&blocks_in_if_conditions::BLOCKS_IN_IF_CONDITIONS),
14481448
LintId::of(&collapsible_if::COLLAPSIBLE_IF),
14491449
LintId::of(&comparison_chain::COMPARISON_CHAIN),
14501450
LintId::of(&doc::MISSING_SAFETY_DOC),
@@ -1639,7 +1639,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
16391639
LintId::of(&inline_fn_without_body::INLINE_FN_WITHOUT_BODY),
16401640
LintId::of(&let_underscore::LET_UNDERSCORE_LOCK),
16411641
LintId::of(&literal_representation::MISTYPED_LITERAL_SUFFIXES),
1642-
LintId::of(&loops::FOR_LOOP_OVER_FALLIBLE),
1642+
LintId::of(&loops::FOR_LOOPS_OVER_FALLIBLES),
16431643
LintId::of(&loops::ITER_NEXT_LOOP),
16441644
LintId::of(&loops::NEVER_LOOP),
16451645
LintId::of(&loops::WHILE_IMMUTABLE_CONDITION),
@@ -1785,17 +1785,17 @@ pub fn register_renamed(ls: &mut rustc_lint::LintStore) {
17851785
ls.register_renamed("clippy::new_without_default_derive", "clippy::new_without_default");
17861786
ls.register_renamed("clippy::cyclomatic_complexity", "clippy::cognitive_complexity");
17871787
ls.register_renamed("clippy::const_static_lifetime", "clippy::redundant_static_lifetimes");
1788-
ls.register_renamed("clippy::block_in_if_condition_expr", "clippy::block_in_if_condition");
1789-
ls.register_renamed("clippy::block_in_if_condition_stmt", "clippy::block_in_if_condition");
1788+
ls.register_renamed("clippy::block_in_if_condition_expr", "clippy::blocks_in_if_conditions");
1789+
ls.register_renamed("clippy::block_in_if_condition_stmt", "clippy::blocks_in_if_conditions");
17901790
ls.register_renamed("clippy::option_map_unwrap_or", "clippy::map_unwrap_or");
17911791
ls.register_renamed("clippy::option_map_unwrap_or_else", "clippy::map_unwrap_or");
17921792
ls.register_renamed("clippy::result_map_unwrap_or_else", "clippy::map_unwrap_or");
17931793
ls.register_renamed("clippy::option_unwrap_used", "clippy::unwrap_used");
17941794
ls.register_renamed("clippy::result_unwrap_used", "clippy::unwrap_used");
17951795
ls.register_renamed("clippy::option_expect_used", "clippy::expect_used");
17961796
ls.register_renamed("clippy::result_expect_used", "clippy::expect_used");
1797-
ls.register_renamed("clippy::for_loop_over_option", "clippy::for_loop_over_fallible");
1798-
ls.register_renamed("clippy::for_loop_over_result", "clippy::for_loop_over_fallible");
1797+
ls.register_renamed("clippy::for_loop_over_option", "clippy::for_loops_over_fallibles");
1798+
ls.register_renamed("clippy::for_loop_over_result", "clippy::for_loops_over_fallibles");
17991799
}
18001800

18011801
// only exists to let the dogfood integration test works.

clippy_lints/src/loops.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ declare_clippy_lint! {
205205
/// // ..
206206
/// }
207207
/// ```
208-
pub FOR_LOOP_OVER_FALLIBLE,
208+
pub FOR_LOOPS_OVER_FALLIBLES,
209209
correctness,
210210
"for-looping over an `Option` or a `Result`, which is more clearly expressed as an `if let`"
211211
}
@@ -426,7 +426,7 @@ declare_lint_pass!(Loops => [
426426
EXPLICIT_ITER_LOOP,
427427
EXPLICIT_INTO_ITER_LOOP,
428428
ITER_NEXT_LOOP,
429-
FOR_LOOP_OVER_FALLIBLE,
429+
FOR_LOOPS_OVER_FALLIBLES,
430430
WHILE_LET_LOOP,
431431
NEEDLESS_COLLECT,
432432
EXPLICIT_COUNTER_LOOP,
@@ -1290,7 +1290,7 @@ fn check_arg_type(cx: &LateContext<'_, '_>, pat: &Pat<'_>, arg: &Expr<'_>) {
12901290
if is_type_diagnostic_item(cx, ty, sym!(option_type)) {
12911291
span_lint_and_help(
12921292
cx,
1293-
FOR_LOOP_OVER_FALLIBLE,
1293+
FOR_LOOPS_OVER_FALLIBLES,
12941294
arg.span,
12951295
&format!(
12961296
"for loop over `{0}`, which is an `Option`. This is more readably written as an \
@@ -1307,7 +1307,7 @@ fn check_arg_type(cx: &LateContext<'_, '_>, pat: &Pat<'_>, arg: &Expr<'_>) {
13071307
} else if is_type_diagnostic_item(cx, ty, sym!(result_type)) {
13081308
span_lint_and_help(
13091309
cx,
1310-
FOR_LOOP_OVER_FALLIBLE,
1310+
FOR_LOOPS_OVER_FALLIBLES,
13111311
arg.span,
13121312
&format!(
13131313
"for loop over `{0}`, which is a `Result`. This is more readably written as an \

src/lintlist/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
7474
module: "blacklisted_name",
7575
},
7676
Lint {
77-
name: "block_in_if_condition",
77+
name: "blocks_in_if_conditions",
7878
group: "style",
7979
desc: "useless or complex blocks that can be eliminated in conditions",
8080
deprecation: None,
81-
module: "block_in_if_condition",
81+
module: "blocks_in_if_conditions",
8282
},
8383
Lint {
8484
name: "bool_comparison",
@@ -676,7 +676,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
676676
module: "loops",
677677
},
678678
Lint {
679-
name: "for_loop_over_fallible",
679+
name: "for_loops_over_fallibles",
680680
group: "correctness",
681681
desc: "for-looping over an `Option` or a `Result`, which is more clearly expressed as an `if let`",
682682
deprecation: None,

tests/ui/block_in_if_condition.fixed renamed to tests/ui/blocks_in_if_conditions.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::block_in_if_condition)]
2+
#![warn(clippy::blocks_in_if_conditions)]
33
#![allow(unused, clippy::let_and_return)]
44
#![warn(clippy::nonminimal_bool)]
55

tests/ui/block_in_if_condition.rs renamed to tests/ui/blocks_in_if_conditions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
#![warn(clippy::block_in_if_condition)]
2+
#![warn(clippy::blocks_in_if_conditions)]
33
#![allow(unused, clippy::let_and_return)]
44
#![warn(clippy::nonminimal_bool)]
55

tests/ui/block_in_if_condition.stderr renamed to tests/ui/blocks_in_if_conditions.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
2-
--> $DIR/block_in_if_condition.rs:26:5
2+
--> $DIR/blocks_in_if_conditions.rs:26:5
33
|
44
LL | / if {
55
LL | | let x = 3;
66
LL | | x == 3
77
LL | | } {
88
| |_____^
99
|
10-
= note: `-D clippy::block-in-if-condition` implied by `-D warnings`
10+
= note: `-D clippy::blocks-in-if-conditions` implied by `-D warnings`
1111
help: try
1212
|
1313
LL | let res = {
@@ -17,13 +17,13 @@ LL | }; if res {
1717
|
1818

1919
error: omit braces around single expression condition
20-
--> $DIR/block_in_if_condition.rs:37:8
20+
--> $DIR/blocks_in_if_conditions.rs:37:8
2121
|
2222
LL | if { true } {
2323
| ^^^^^^^^ help: try: `true`
2424

2525
error: this boolean expression can be simplified
26-
--> $DIR/block_in_if_condition.rs:46:8
26+
--> $DIR/blocks_in_if_conditions.rs:46:8
2727
|
2828
LL | if true && x == 3 {
2929
| ^^^^^^^^^^^^^^ help: try: `x == 3`

tests/ui/block_in_if_condition_closure.rs renamed to tests/ui/blocks_in_if_conditions_closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(clippy::block_in_if_condition)]
1+
#![warn(clippy::blocks_in_if_conditions)]
22
#![allow(unused, clippy::let_and_return)]
33

44
fn predicate<F: FnOnce(T) -> bool, T>(pfn: F, val: T) -> bool {

tests/ui/block_in_if_condition_closure.stderr renamed to tests/ui/blocks_in_if_conditions_closure.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
2-
--> $DIR/block_in_if_condition_closure.rs:18:17
2+
--> $DIR/blocks_in_if_conditions_closure.rs:18:17
33
|
44
LL | |x| {
55
| _________________^
@@ -8,10 +8,10 @@ LL | | x == target
88
LL | | },
99
| |_____________^
1010
|
11-
= note: `-D clippy::block-in-if-condition` implied by `-D warnings`
11+
= note: `-D clippy::blocks-in-if-conditions` implied by `-D warnings`
1212

1313
error: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
14-
--> $DIR/block_in_if_condition_closure.rs:27:13
14+
--> $DIR/blocks_in_if_conditions_closure.rs:27:13
1515
|
1616
LL | |x| {
1717
| _____________^

tests/ui/for_loop_over_fallible.rs renamed to tests/ui/for_loops_over_fallibles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#![warn(clippy::for_loop_over_fallible)]
1+
#![warn(clippy::for_loops_over_fallibles)]
22

3-
fn for_loop_over_fallible() {
3+
fn for_loops_over_fallibles() {
44
let option = Some(1);
55
let result = option.ok_or("x not found");
66
let v = vec![0, 1, 2];

0 commit comments

Comments
 (0)