@@ -6,7 +6,105 @@ document.
6
6
7
7
## Unreleased / Beta / In Rust Nightly
8
8
9
- [ 3e3715c3...master] ( https://github.com/rust-lang/rust-clippy/compare/3e3715c3...master )
9
+ [1e5237f4...master](https://github.com/rust-lang/rust-clippy/compare/1e5237f4...master)
10
+
11
+ ## Rust 1.87
12
+
13
+ Current stable, released 2025-05-15
14
+
15
+ [View all 127 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2025-02-06T14%3A54%3A28Z..2025-03-20T20%3A07%3A53Z+base%3Amaster)
16
+
17
+ ### New Lints
18
+
19
+ * Added [`doc_comment_double_space_linebreaks`] to `pedantic` [#12876](https://github.com/rust-lang/rust-clippy/pull/12876)
20
+ * Added [`manual_midpoint`] to `pedantic` [#13851](https://github.com/rust-lang/rust-clippy/pull/13851)
21
+ * Added [`io_other_error`] to `style` [#14022](https://github.com/rust-lang/rust-clippy/pull/14022)
22
+ * Added [`owned_cow`] to `pedantic` [#13948](https://github.com/rust-lang/rust-clippy/pull/13948)
23
+ * Added [`manual_contains`] to `perf` [#13817](https://github.com/rust-lang/rust-clippy/pull/13817)
24
+ * Added [`unnecessary_debug_formatting`] to `pedantic` [#13893](https://github.com/rust-lang/rust-clippy/pull/13893)
25
+ * Added [`elidable_lifetime_names`] to `pedantic` [#13960](https://github.com/rust-lang/rust-clippy/pull/13960)
26
+ * Added [`mem_replace_option_with_some`] to `style` [#14197](https://github.com/rust-lang/rust-clippy/pull/14197)
27
+ * Added [`unbuffered_bytes`] to `perf` [#14089](https://github.com/rust-lang/rust-clippy/pull/14089)
28
+ * Added [`single_option_map`] to `nursery` [#14033](https://github.com/rust-lang/rust-clippy/pull/14033)
29
+
30
+ ### Moves and Deprecations
31
+
32
+ * Moved [`comparison_chain`] to `pedantic` (from `style`)
33
+ [#14219](https://github.com/rust-lang/rust-clippy/pull/14219)
34
+ * Moved [`manual_ok_or`] to `style` (from `pedantic`)
35
+ [#14027](https://github.com/rust-lang/rust-clippy/pull/14027)
36
+ * Deprecated [`option_map_or_err_ok`] in favor of [`manual_ok_or`]
37
+ [#14027](https://github.com/rust-lang/rust-clippy/pull/14027)
38
+
39
+ ### Enhancements
40
+
41
+ * Add `allow_expect_in_consts` and `allow_unwrap_in_consts` configuration options to [`unwrap_used`], [`expect_used`]
42
+ [#14200](https://github.com/rust-lang/rust-clippy/pull/14200)
43
+ * Add `check-incompatible-msrv-in-tests` configuration option to [`incompatible_msrv`]
44
+ [#14279](https://github.com/rust-lang/rust-clippy/pull/14279)
45
+ * [`len_zero`] now also triggers if deref target implements `is_empty()`
46
+ [#13871](https://github.com/rust-lang/rust-clippy/pull/13871)
47
+ * [`ptr_eq`] now handles more cases, including `!=` in addition to `==`
48
+ [#14339](https://github.com/rust-lang/rust-clippy/pull/14339)
49
+ * [`struct_field_names`] now also checks private fields of public structs
50
+ [#14076](https://github.com/rust-lang/rust-clippy/pull/14076)
51
+ * [`needless_pass_by_value`] suggests using a reference on the innermost `Option` content
52
+ [#14392](https://github.com/rust-lang/rust-clippy/pull/14392)
53
+ * [`obfuscated_if_else`] now supports `then().unwrap_or_else()` and `then_some().unwrap_or_else()`
54
+ [#14165](https://github.com/rust-lang/rust-clippy/pull/14165)
55
+ * Format macros: all format-handling lints now validate `todo!` and `unimplemented!` macros
56
+ [#14266](https://github.com/rust-lang/rust-clippy/pull/14266)
57
+ * [`disallowed_methods`] now supports replacements
58
+ [#13669](https://github.com/rust-lang/rust-clippy/pull/13669)
59
+ * Added MSRV checks for several lints:
60
+ * [`question_mark`] [#14436](https://github.com/rust-lang/rust-clippy/pull/14436)
61
+ * [`repeat_vec_with_capacity`] [#14126](https://github.com/rust-lang/rust-clippy/pull/14126)
62
+ * [`manual_flatten`] [#14086](https://github.com/rust-lang/rust-clippy/pull/14086)
63
+ * [`lines_filter_map_ok`] [#14130](https://github.com/rust-lang/rust-clippy/pull/14130)
64
+
65
+ ### False Positive Fixes
66
+
67
+ * [`missing_const_for_fn`] no longer triggers on unstable const traits [#14294](https://github.com/rust-lang/rust-clippy/pull/14294)
68
+ * [`unnecessary_to_owned`] now avoids suggesting to call `iter()` on a temporary object [#14243](https://github.com/rust-lang/rust-clippy/pull/14243)
69
+ * [`unnecessary_debug_formatting`] no longer triggers in tests [#14347](https://github.com/rust-lang/rust-clippy/pull/14347)
70
+ * [`option_if_let_else`] now handles cases when value is partially moved [#14209](https://github.com/rust-lang/rust-clippy/pull/14209)
71
+ * [`blocks_in_conditions`] no longer triggers when the condition contains a `return` [#14338](https://github.com/rust-lang/rust-clippy/pull/14338)
72
+ * [`undocumented_unsafe_blocks`] no longer triggers on trait/impl items [#13888](https://github.com/rust-lang/rust-clippy/pull/13888)
73
+ * [`manual_slice_fill`] no longer triggers due to missing index checks [#14193](https://github.com/rust-lang/rust-clippy/pull/14193)
74
+ * [`useless_asref`] no longer suggests using `.clone()` if the target type doesn't implement `Clone` [#14174](https://github.com/rust-lang/rust-clippy/pull/14174)
75
+ * [`unnecessary_safety_comment`] no longer triggers on desugared assign [#14371](https://github.com/rust-lang/rust-clippy/pull/14371)
76
+ * [`unnecessary_map_or`] no longer consumes the comparison value if it does not implement `Copy` [#14207](https://github.com/rust-lang/rust-clippy/pull/14207)
77
+ * [`let_and_return`] no longer triggers involving short-lived block temporary variables [#14180](https://github.com/rust-lang/rust-clippy/pull/14180)
78
+ * [`manual_async_fn`] no longer emits suggestions inside macros [#14142](https://github.com/rust-lang/rust-clippy/pull/14142)
79
+ * [`use_self`] skips analysis inside macro expansions of a `impl Self` block [#13128](https://github.com/rust-lang/rust-clippy/pull/13128)
80
+ * [`double_ended_iterator_last`] no longer triggers on non-reference immutable receiver [#14140](https://github.com/rust-lang/rust-clippy/pull/14140)
81
+
82
+ ### ICE Fixes
83
+
84
+ * [`macro_use_imports`] Fix ICE when checking attributes
85
+ [#14317](https://github.com/rust-lang/rust-clippy/pull/14317)
86
+ * [`doc_nested_refdefs`] Fix ICE by avoiding invalid ranges
87
+ [#14308](https://github.com/rust-lang/rust-clippy/pull/14308)
88
+ * [`just_underscores_and_digits`] Fix ICE in error recovery scenario
89
+ [#14168](https://github.com/rust-lang/rust-clippy/pull/14168)
90
+ * [`declare_interior_mutable_const`], [`borrow_interior_mutable_const`] Fix ICE by properly resolving `<T as Trait>::AssocT` projections
91
+ [#14125](https://github.com/rust-lang/rust-clippy/pull/14125)
92
+
93
+ ### Documentation Improvements
94
+
95
+ * [`struct_excessive_bools`] Documentation improved with rationale
96
+ [#14351](https://github.com/rust-lang/rust-clippy/pull/14351)
97
+
98
+ ### Others
99
+
100
+ * Use edition=2021 in `rustc_tools_util`
101
+ [#14211](https://github.com/rust-lang/rust-clippy/pull/14211)
102
+ * Fix rustc_tools_util's `version.host_compiler` release channel, expose the rustc version, and add tests
103
+ [#14123](https://github.com/rust-lang/rust-clippy/pull/14123)
104
+ * Make UI test annotations mandatory
105
+ [#11421](https://github.com/rust-lang/rust-clippy/pull/11421)
106
+ [#14388](https://github.com/rust-lang/rust-clippy/pull/14388)
107
+ [#14393](https://github.com/rust-lang/rust-clippy/pull/14393)
10
108
11
109
## Rust 1.86
12
110
@@ -5583,6 +5681,7 @@ Released 2018-09-13
5583
5681
[`clone_on_copy`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
5584
5682
[`clone_on_ref_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_ref_ptr
5585
5683
[`cloned_instead_of_copied`]: https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
5684
+ [`cloned_ref_to_slice_refs`]: https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs
5586
5685
[`cmp_nan`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_nan
5587
5686
[`cmp_null`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null
5588
5687
[`cmp_owned`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
@@ -5594,6 +5693,7 @@ Released 2018-09-13
5594
5693
[`collection_is_never_read`]: https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read
5595
5694
[`comparison_chain`]: https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
5596
5695
[`comparison_to_empty`]: https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
5696
+ [`confusing_method_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#confusing_method_to_numeric_cast
5597
5697
[`const_is_empty`]: https://rust-lang.github.io/rust-clippy/master/index.html#const_is_empty
5598
5698
[`const_static_lifetime`]: https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime
5599
5699
[`copy_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#copy_iterator
@@ -6383,6 +6483,7 @@ Released 2018-09-13
6383
6483
[`accept-comment-above-statement`]: https://doc.rust-lang.org/clippy/lint_configuration.html#accept-comment-above-statement
6384
6484
[`allow-comparison-to-zero`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-comparison-to-zero
6385
6485
[`allow-dbg-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-dbg-in-tests
6486
+ [`allow-exact-repetitions`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-exact-repetitions
6386
6487
[`allow-expect-in-consts`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-expect-in-consts
6387
6488
[`allow-expect-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-expect-in-tests
6388
6489
[`allow-indexing-slicing-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#allow-indexing-slicing-in-tests
@@ -6435,6 +6536,7 @@ Released 2018-09-13
6435
6536
[`max-suggested-slice-pattern-length`]: https://doc.rust-lang.org/clippy/lint_configuration.html#max-suggested-slice-pattern-length
6436
6537
[`max-trait-bounds`]: https://doc.rust-lang.org/clippy/lint_configuration.html#max-trait-bounds
6437
6538
[`min-ident-chars-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#min-ident-chars-threshold
6539
+ [`missing-docs-allow-unused`]: https://doc.rust-lang.org/clippy/lint_configuration.html#missing-docs-allow-unused
6438
6540
[`missing-docs-in-crate-items`]: https://doc.rust-lang.org/clippy/lint_configuration.html#missing-docs-in-crate-items
6439
6541
[`module-item-order-groupings`]: https://doc.rust-lang.org/clippy/lint_configuration.html#module-item-order-groupings
6440
6542
[`module-items-ordered-within-groupings`]: https://doc.rust-lang.org/clippy/lint_configuration.html#module-items-ordered-within-groupings
0 commit comments