You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#5563 - ThibsG:MergeLints, r=flip1995
Merge some lints together
This PR merges following lints:
- `block_in_if_condition_expr` and `block_in_if_condition_stmt` → `blocks_in_if_conditions`
- `option_map_unwrap_or`, `option_map_unwrap_or_else` and `result_map_unwrap_or_else` → `map_unwrap`
- `option_unwrap_used` and `result_unwrap_used` → `unwrap_used`
- `option_expect_used` and `result_expect_used` → `expect_used`
- `wrong_pub_self_convention` into `wrong_self_convention`
- `for_loop_over_option` and `for_loop_over_result` → `for_loops_over_fallibles`
Lints that have already been merged since the issue was created:
- [x] `new_without_default` and `new_without_default_derive` → `new_without_default`
Need more discussion:
- `string_add` and `string_add_assign`: do we agree to merge them or not? Is there something more to do? → **not merge finally**
- `identity_op` and `modulo_one` → `useless_arithmetic`: seems outdated, since `modulo_arithmetic` has been created.
fixesrust-lang#1078
changelog: Merging some lints together:
- `block_in_if_condition_expr` and `block_in_if_condition_stmt` → `blocks_in_if_conditions`
- `option_map_unwrap_or`, `option_map_unwrap_or_else` and `result_map_unwrap_or_else` → `map_unwrap_or`
- `option_unwrap_used` and `result_unwrap_used` → `unwrap_used`
- `option_expect_used` and `result_expect_used` → `expect_used`
- `for_loop_over_option` and `for_loop_over_result` → `for_loops_over_fallibles`
* Move `redundant_clone` to perf group [#4509](https://github.com/rust-lang/rust-clippy/pull/4509)
288
288
* Move `manual_mul_add` to nursery group [#4736](https://github.com/rust-lang/rust-clippy/pull/4736)
289
289
* 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
395
395
* Fix false positive in [`useless_attribute`][#4107](https://github.com/rust-lang/rust-clippy/pull/4107)
396
396
* Fix incorrect suggestion for [`float_cmp`][#4214](https://github.com/rust-lang/rust-clippy/pull/4214)
397
397
* 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)
399
399
* Improve suggestions for [`non_ascii_literal`][#4119](https://github.com/rust-lang/rust-clippy/pull/4119)
400
400
* Improve diagnostics for [`let_and_return`][#4137](https://github.com/rust-lang/rust-clippy/pull/4137)
401
401
* 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
448
448
* Fix false positive in [`needless_range_loop`] pertaining to structs without a `.iter()`
449
449
* Fix false positive in [`bool_comparison`] pertaining to non-bool types
450
450
* 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
452
452
* Fix false positives in [`missing_const_for_fn`] pertaining to macros and trait method impls
453
453
* Fix false positive in [`needless_pass_by_value`] pertaining to procedural macros
454
454
* Fix false positive in [`needless_continue`] pertaining to loop labels
@@ -794,7 +794,7 @@ Released 2018-09-13
794
794
795
795
## 0.0.169
796
796
* 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`]
798
798
799
799
## 0.0.168
800
800
* Rustup to *rustc 1.23.0-nightly (f0fe716db 2017-10-30)*
@@ -1068,7 +1068,7 @@ Released 2018-09-13
1068
1068
1069
1069
## 0.0.93 — 2016-10-03
1070
1070
* 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
1072
1072
allowed by default.
1073
1073
* New lint: [`explicit_into_iter_loop`]
1074
1074
@@ -1087,8 +1087,8 @@ Released 2018-09-13
1087
1087
## 0.0.88 — 2016-09-04
1088
1088
* Rustup to *rustc 1.13.0-nightly (70598e04f 2016-09-03)*
1089
1089
* The following lints are not new but were only usable through the `clippy`
0 commit comments