Skip to content

Commit a333abf

Browse files
authored
Changelog for Clippy 1.95 (#16842)
Violets are red, Roses are blue, This month brings rain, and sunshine peeks through. ---- Alexa from @bestman8 <img width="1080" height="1616" alt="image" src="https://github.com/user-attachments/assets/eb86a6d2-427c-441c-ad03-1c0ace63128d" /> <br/> <br/> and <br/> <br/> Ichigo from @oupson <img width="1637" height="2214" alt="image" src="https://github.com/user-attachments/assets/c8610a1b-6bce-453d-aefb-0c906ca6940c" /> are the winners at rust-lang/rust-clippy#16653 P.S. Since there was no voting, picked the one with more hearts ---- Cats for the next release can be nominated in the comments🙏 changelog: none r? flip1995
2 parents 5ba0e3a + 787dd49 commit a333abf

3 files changed

Lines changed: 120 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 118 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,124 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[500e0ff...master](https://github.com/rust-lang/rust-clippy/compare/500e0ff...master)
9+
[df995e...master](https://github.com/rust-lang/rust-clippy/compare/df995e...master)
10+
11+
## Rust 1.95
12+
13+
Current stable, released 2026-04-16
14+
15+
[View all 107 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2026-01-09T11%3A07%3A27Z..2026-02-23T22%3A37%3A09Z+base%3Amaster)
16+
17+
### New Lints
18+
19+
* Added [`unnecessary_trailing_comma`] to `pedantic`
20+
[#16530](https://github.com/rust-lang/rust-clippy/pull/16530)
21+
* Added [`disallowed_fields`] to `style`
22+
[#16218](https://github.com/rust-lang/rust-clippy/pull/16218)
23+
* Added [`manual_checked_ops`] to `complexity`
24+
[#16149](https://github.com/rust-lang/rust-clippy/pull/16149)
25+
* Added [`duration_suboptimal_units`] to `pedantic`
26+
[#16250](https://github.com/rust-lang/rust-clippy/pull/16250)
27+
* Added [`manual_take`] to `complexity`
28+
[#16368](https://github.com/rust-lang/rust-clippy/pull/16368)
29+
30+
### Enhancements
31+
32+
* [`explicit_counter_loop`] fix FN when loop counter starts at non-zero
33+
[#16620](https://github.com/rust-lang/rust-clippy/pull/16620)
34+
* [`manual_is_variant_and`] extend to cover `filter` chaining `is_some`
35+
[#16521](https://github.com/rust-lang/rust-clippy/pull/16521)
36+
* [`manual_is_variant_and`] enhance to cover manual `is_none_or`
37+
[#16424](https://github.com/rust-lang/rust-clippy/pull/16424)
38+
* [`collapsible_match`] extend to cover if-elses
39+
[#16560](https://github.com/rust-lang/rust-clippy/pull/16560)
40+
* [`useless_conversion`] also fire inside compiler desugarings
41+
[#16594](https://github.com/rust-lang/rust-clippy/pull/16594)
42+
* [`unwrap_used`] and [`expect_used`] add `allow-unwrap-types` configuration
43+
[#16605](https://github.com/rust-lang/rust-clippy/pull/16605)
44+
* [`unwrap_used`] and [`expect_used`] optimize `allow-unwrap-types` evaluation to eliminate performance regression
45+
[#16652](https://github.com/rust-lang/rust-clippy/pull/16652)
46+
* [`unchecked_time_subtraction`] extend to better handle `Duration` literals
47+
[#16528](https://github.com/rust-lang/rust-clippy/pull/16528)
48+
* [`unnecessary_fold`] match against an accumulator on both sides
49+
[#16604](https://github.com/rust-lang/rust-clippy/pull/16604)
50+
* [`iter_kv_map`] extend to cover `flat_map` and `filter_map`
51+
[#16519](https://github.com/rust-lang/rust-clippy/pull/16519)
52+
* [`question_mark`] enhance to cover `else if`
53+
[#16455](https://github.com/rust-lang/rust-clippy/pull/16455)
54+
* [`double_comparisons`] check for expressions such as `x != y && x >= y`
55+
[#16033](https://github.com/rust-lang/rust-clippy/pull/16033)
56+
* [`needless_collect`] enhance to cover vec `push`-alike cases
57+
[#16305](https://github.com/rust-lang/rust-clippy/pull/16305)
58+
* [`strlen_on_c_strings`] changes suggestion to use `CStr::count_bytes()`
59+
[#16323](https://github.com/rust-lang/rust-clippy/pull/16323)
60+
* [`transmuting_null`] now checks for `ptr::without_provenance` and `ptr::without_provenance_mut`
61+
[#16336](https://github.com/rust-lang/rust-clippy/pull/16336)
62+
* [`map_unwrap_or`] add cover for `Result::unwrap_or`
63+
[#15718](https://github.com/rust-lang/rust-clippy/pull/15718)
64+
* [`clone_on_ref_ptr`] don't add a `&` to the receiver if it's a reference
65+
[#15742](https://github.com/rust-lang/rust-clippy/pull/15742)
66+
* [`double_must_use`], [`drop_non_drop`], [`let_underscore_must_use`] consider `Result<T, U>` and
67+
`ControlFlow<U, T>` as `T` wrt `#[must_use]` if `U` is uninhabited
68+
[#16353](https://github.com/rust-lang/rust-clippy/pull/16353)
69+
* [`str_to_string`] handle a case when `ToString::to_string` is passed as function parameter
70+
[#16512](https://github.com/rust-lang/rust-clippy/pull/16512)
71+
* [`must_use_candidate`] no longer lints `main` functions with return values
72+
[#16552](https://github.com/rust-lang/rust-clippy/pull/16552)
73+
* [`needless_continue`] `allow` and `expect` attributes can also be used on the statement
74+
[#16265](https://github.com/rust-lang/rust-clippy/pull/16265)
75+
* [`int_plus_one`] fix FN with negative literals, e.g. `-1 + x <= y`
76+
[#16373](https://github.com/rust-lang/rust-clippy/pull/16373)
77+
78+
### False Positive Fixes
79+
80+
* [`assertions_on_result_states`] and [`missing_assert_message`] fix FP on edition 2015 and 2018
81+
[#16473](https://github.com/rust-lang/rust-clippy/pull/16473)
82+
* [`redundant_iter_cloned`] fix FP with move closures and coroutines
83+
[#16494](https://github.com/rust-lang/rust-clippy/pull/16494)
84+
* [`str_to_string`] fix FP on non-str types
85+
[#16571](https://github.com/rust-lang/rust-clippy/pull/16571)
86+
* [`unnecessary_cast`] do not warn on casts of external function return type
87+
[#16415](https://github.com/rust-lang/rust-clippy/pull/16415)
88+
* [`cmp_owned`] fix FP when `to_string` comes from macro input
89+
[#16468](https://github.com/rust-lang/rust-clippy/pull/16468)
90+
* [`useless_attribute`] fix FP on `exported_private_dependencies` lint attributes
91+
[#16470](https://github.com/rust-lang/rust-clippy/pull/16470)
92+
* [`manual_dangling_ptr`] fix FP when pointee type is not `Sized`
93+
[#16469](https://github.com/rust-lang/rust-clippy/pull/16469)
94+
* [`test_attr_in_doctest`] fix FP on `test_harness`
95+
[#16454](https://github.com/rust-lang/rust-clippy/pull/16454)
96+
* [`doc_paragraphs_missing_punctuation`] allow unpunctuated paragraphs before lists and code blocks
97+
[#16487](https://github.com/rust-lang/rust-clippy/pull/16487)
98+
* [`elidable_lifetime_names`] skip linting proc-macro generated code
99+
[#16402](https://github.com/rust-lang/rust-clippy/pull/16402)
100+
* [`undocumented_unsafe_blocks`] recognize safety comments inside blocks and on same line in macros
101+
[#16339](https://github.com/rust-lang/rust-clippy/pull/16339)
102+
103+
### ICE Fixes
104+
105+
* [`match_same_arms`] fix ICE in `match_same_arms`
106+
[#16685](https://github.com/rust-lang/rust-clippy/pull/16685)
107+
* [`nonminimal_bool`] fix ICE in `swap_binop()` by using the proper `TypeckResults`
108+
[#16659](https://github.com/rust-lang/rust-clippy/pull/16659)
109+
* [`redundant_closure_for_method_calls`] fix ICE when computing the path from a type to itself
110+
[#16362](https://github.com/rust-lang/rust-clippy/pull/16362)
111+
112+
### Documentation Improvements
113+
114+
* [`cast_possible_wrap`] mention `cast_{un,}signed()` methods in the documentation
115+
[#16407](https://github.com/rust-lang/rust-clippy/pull/16407)
116+
* [`ignore_without_reason`] and [`redundant_test_prefix`] mention an extra `clippy` argument
117+
needed to check tests
118+
[#16205](https://github.com/rust-lang/rust-clippy/pull/16205)
119+
* [`doc_paragraphs_missing_punctuation`] improve its documentation
120+
[#16377](https://github.com/rust-lang/rust-clippy/pull/16377)
121+
* [`missing_trait_methods`] better help message
122+
[#16380](https://github.com/rust-lang/rust-clippy/pull/16380)
123+
* [`strlen_on_c_strings`] mention the specific type (`CString` or `CStr`)
124+
[#16391](https://github.com/rust-lang/rust-clippy/pull/16391)
125+
* [`suspicious_to_owned`] improve lint messages
126+
[#16376](https://github.com/rust-lang/rust-clippy/pull/16376)
10127

11128
## Rust 1.94
12129

@@ -104,11 +221,6 @@ Current stable, released 2026-03-05
104221
* [`needless_type_cast`] do not ICE on struct constructor
105222
[#16245](https://github.com/rust-lang/rust-clippy/pull/16245)
106223

107-
### New Lints
108-
109-
* Added [`unnecessary_trailing_comma`] to `style` (single-line format-like macros only)
110-
[#13965](https://github.com/rust-lang/rust-clippy/issues/13965)
111-
112224
## Rust 1.93
113225

114226
Current stable, released 2026-01-22

clippy_lints/src/disallowed_fields.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_clippy_lint! {
5050
/// let range = Range { start: 0, end: 1 };
5151
/// println!("{}", range.end); // `end` is _not_ disallowed in the config.
5252
/// ```
53-
#[clippy::version = "1.93.0"]
53+
#[clippy::version = "1.95.0"]
5454
pub DISALLOWED_FIELDS,
5555
style,
5656
"declaration of a disallowed field use"

clippy_lints/src/manual_take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare_clippy_lint! {
3333
/// let mut x = true;
3434
/// let _ = std::mem::take(&mut x);
3535
/// ```
36-
#[clippy::version = "1.94.0"]
36+
#[clippy::version = "1.95.0"]
3737
pub MANUAL_TAKE,
3838
complexity,
3939
"manual `mem::take` implementation"

0 commit comments

Comments
 (0)