Skip to content

Commit 2ce5451

Browse files
authored
Changelog for Clippy 1.87 🦡 (#14748)
Violets are red, Roses are blue, It’s wrong on purpose — We don’t break tradition. <hr> This is cat-penguin of this release [nominated by](#12224 (comment)) @xFrednet some time ago: ![image](https://github.com/user-attachments/assets/49bd7783-9d56-4a15-b026-1c7e799ea7ba) Cats for the next release can be traditionally nominated in the comments :D Please be more active and cat-minded 😻 <hr> changelog: none r? flip1995
2 parents 74fd9ed + 55b5c83 commit 2ce5451

File tree

6 files changed

+105
-7
lines changed

6 files changed

+105
-7
lines changed

‎CHANGELOG.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,105 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

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)
10108

11109
## Rust 1.86
12110

‎clippy_lints/src/lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ declare_clippy_lint! {
8888
/// x.chars()
8989
/// }
9090
/// ```
91-
#[clippy::version = "1.84.0"]
91+
#[clippy::version = "1.87.0"]
9292
pub ELIDABLE_LIFETIME_NAMES,
9393
pedantic,
9494
"lifetime name that can be replaced with the anonymous lifetime"

‎clippy_lints/src/mem_replace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ declare_clippy_lint! {
6262
/// let mut an_option = Some(0);
6363
/// let taken = an_option.replace(1);
6464
/// ```
65-
#[clippy::version = "1.86.0"]
65+
#[clippy::version = "1.87.0"]
6666
pub MEM_REPLACE_OPTION_WITH_SOME,
6767
style,
6868
"replacing an `Option` with `Some` instead of `replace()`"

‎clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4428,7 +4428,7 @@ declare_clippy_lint! {
44284428
/// let file = BufReader::new(std::fs::File::open("./bytes.txt").unwrap());
44294429
/// file.bytes();
44304430
/// ```
4431-
#[clippy::version = "1.86.0"]
4431+
#[clippy::version = "1.87.0"]
44324432
pub UNBUFFERED_BYTES,
44334433
perf,
44344434
"calling .bytes() is very inefficient when data is not in memory"
@@ -4453,7 +4453,7 @@ declare_clippy_lint! {
44534453
/// values.contains(&10)
44544454
/// }
44554455
/// ```
4456-
#[clippy::version = "1.86.0"]
4456+
#[clippy::version = "1.87.0"]
44574457
pub MANUAL_CONTAINS,
44584458
perf,
44594459
"unnecessary `iter().any()` on slices that can be replaced with `contains()`"

‎clippy_lints/src/single_option_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare_clippy_lint! {
3030
/// param * 2
3131
/// }
3232
/// ```
33-
#[clippy::version = "1.86.0"]
33+
#[clippy::version = "1.87.0"]
3434
pub SINGLE_OPTION_MAP,
3535
nursery,
3636
"Checks for functions with method calls to `.map(_)` on an arg of type `Option` as the outermost expression."

‎clippy_lints/src/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ declare_clippy_lint! {
385385
/// ```no_run
386386
/// let right: std::borrow::Cow<'_, [u8]>;
387387
/// ```
388-
#[clippy::version = "1.85.0"]
388+
#[clippy::version = "1.87.0"]
389389
pub OWNED_COW,
390390
style,
391391
"needlessly owned Cow type"

0 commit comments

Comments
 (0)