@@ -6,11 +6,204 @@ document.
6
6
7
7
## Unreleased / Beta / In Rust Nightly
8
8
9
- [ 4f142aa1...master] ( https://github.com/rust-lang/rust-clippy/compare/4f142aa1...master )
9
+ [ d822110d...master] ( https://github.com/rust-lang/rust-clippy/compare/d822110d...master )
10
+
11
+ ## Rust 1.67
12
+
13
+ Current stable, released 2023-01-26
14
+
15
+ [ 4f142aa1...d822110d] ( https://github.com/rust-lang/rust-clippy/compare/4f142aa1...d822110d )
16
+
17
+ ### New Lints
18
+
19
+ * [ ` seek_from_current ` ]
20
+ [ #9681 ] ( https://github.com/rust-lang/rust-clippy/pull/9681 )
21
+ * [ ` from_raw_with_void_ptr ` ]
22
+ [ #9690 ] ( https://github.com/rust-lang/rust-clippy/pull/9690 )
23
+ * [ ` misnamed_getters ` ]
24
+ [ #9770 ] ( https://github.com/rust-lang/rust-clippy/pull/9770 )
25
+ * [ ` seek_to_start_instead_of_rewind ` ]
26
+ [ #9667 ] ( https://github.com/rust-lang/rust-clippy/pull/9667 )
27
+ * [ ` suspicious_xor_used_as_pow ` ]
28
+ [ #9506 ] ( https://github.com/rust-lang/rust-clippy/pull/9506 )
29
+ * [ ` unnecessary_safety_doc ` ]
30
+ [ #9822 ] ( https://github.com/rust-lang/rust-clippy/pull/9822 )
31
+ * [ ` unchecked_duration_subtraction ` ]
32
+ [ #9570 ] ( https://github.com/rust-lang/rust-clippy/pull/9570 )
33
+ * [ ` manual_is_ascii_check ` ]
34
+ [ #9765 ] ( https://github.com/rust-lang/rust-clippy/pull/9765 )
35
+ * [ ` unnecessary_safety_comment ` ]
36
+ [ #9851 ] ( https://github.com/rust-lang/rust-clippy/pull/9851 )
37
+ * [ ` let_underscore_future ` ]
38
+ [ #9760 ] ( https://github.com/rust-lang/rust-clippy/pull/9760 )
39
+ * [ ` manual_let_else ` ]
40
+ [ #8437 ] ( https://github.com/rust-lang/rust-clippy/pull/8437 )
41
+
42
+ ### Moves and Deprecations
43
+
44
+ * Moved [ ` uninlined_format_args ` ] to ` style ` (Now warn-by-default)
45
+ [ #9865 ] ( https://github.com/rust-lang/rust-clippy/pull/9865 )
46
+ * Moved [ ` needless_collect ` ] to ` nursery ` (Now allow-by-default)
47
+ [ #9705 ] ( https://github.com/rust-lang/rust-clippy/pull/9705 )
48
+ * Moved [ ` or_fun_call ` ] to ` nursery ` (Now allow-by-default)
49
+ [ #9829 ] ( https://github.com/rust-lang/rust-clippy/pull/9829 )
50
+ * Uplifted [ ` let_underscore_lock ` ] into rustc
51
+ [ #9697 ] ( https://github.com/rust-lang/rust-clippy/pull/9697 )
52
+ * Uplifted [ ` let_underscore_drop ` ] into rustc
53
+ [ #9697 ] ( https://github.com/rust-lang/rust-clippy/pull/9697 )
54
+ * Moved [ ` bool_to_int_with_if ` ] to ` pedantic ` (Now allow-by-default)
55
+ [ #9830 ] ( https://github.com/rust-lang/rust-clippy/pull/9830 )
56
+ * Move ` index_refutable_slice ` to ` pedantic ` (Now warn-by-default)
57
+ [ #9975 ] ( https://github.com/rust-lang/rust-clippy/pull/9975 )
58
+ * Moved [ ` manual_clamp ` ] to ` nursery ` (Now allow-by-default)
59
+ [ #10101 ] ( https://github.com/rust-lang/rust-clippy/pull/10101 )
60
+
61
+ ### Enhancements
62
+
63
+ * The scope of ` #![clippy::msrv] ` is now tracked correctly
64
+ [ #9924 ] ( https://github.com/rust-lang/rust-clippy/pull/9924 )
65
+ * ` #[clippy::msrv] ` can now be used as an outer attribute
66
+ [ #9860 ] ( https://github.com/rust-lang/rust-clippy/pull/9860 )
67
+ * Clippy will now avoid Cargo's cache, if ` Cargo.toml ` or ` clippy.toml ` have changed
68
+ [ #9707 ] ( https://github.com/rust-lang/rust-clippy/pull/9707 )
69
+ * [ ` uninlined_format_args ` ] : Added a new config ` allow-mixed-uninlined-format-args ` to allow the
70
+ lint, if only some arguments can be inlined
71
+ [ #9865 ] ( https://github.com/rust-lang/rust-clippy/pull/9865 )
72
+ * [ ` needless_lifetimes ` ] : Now provides suggests for individual lifetimes
73
+ [ #9743 ] ( https://github.com/rust-lang/rust-clippy/pull/9743 )
74
+ * [ ` needless_collect ` ] : Now detects needless ` is_empty ` and ` contains ` calls
75
+ [ #8744 ] ( https://github.com/rust-lang/rust-clippy/pull/8744 )
76
+ * [ ` blanket_clippy_restriction_lints ` ] : Now lints, if ` clippy::restriction ` is enabled via the
77
+ command line arguments
78
+ [ #9755 ] ( https://github.com/rust-lang/rust-clippy/pull/9755 )
79
+ * [ ` mutable_key_type ` ] : Now has the ` ignore-interior-mutability ` configuration, to add types which
80
+ should be ignored by the lint
81
+ [ #9692 ] ( https://github.com/rust-lang/rust-clippy/pull/9692 )
82
+ * [ ` uninlined_format_args ` ] : Now works for multiline ` format! ` expressions
83
+ [ #9945 ] ( https://github.com/rust-lang/rust-clippy/pull/9945 )
84
+ * [ ` cognitive_complexity ` ] : Now works for async functions
85
+ [ #9828 ] ( https://github.com/rust-lang/rust-clippy/pull/9828 )
86
+ [ #9836 ] ( https://github.com/rust-lang/rust-clippy/pull/9836 )
87
+ * [ ` vec_box ` ] : Now avoids an off-by-one error when using the ` vec-box-size-threshold ` configuration
88
+ [ #9848 ] ( https://github.com/rust-lang/rust-clippy/pull/9848 )
89
+ * [ ` never_loop ` ] : Now correctly handles breaks in nested labeled blocks
90
+ [ #9858 ] ( https://github.com/rust-lang/rust-clippy/pull/9858 )
91
+ [ #9837 ] ( https://github.com/rust-lang/rust-clippy/pull/9837 )
92
+ * [ ` disallowed_methods ` ] , [ ` disallowed_types ` ] , [ ` disallowed_macros ` ] : Now correctly resolve
93
+ paths, if a crate is used multiple times with different versions
94
+ [ #9800 ] ( https://github.com/rust-lang/rust-clippy/pull/9800 )
95
+ * [ ` disallowed_methods ` ] : Can now be used for local methods
96
+ [ #9800 ] ( https://github.com/rust-lang/rust-clippy/pull/9800 )
97
+ * [ ` print_stdout ` ] , [ ` print_stderr ` ] : Can now be enabled in test with the ` allow-print-in-tests `
98
+ config value
99
+ [ #9797 ] ( https://github.com/rust-lang/rust-clippy/pull/9797 )
100
+ * [ ` from_raw_with_void_ptr ` ] : Now works for ` Rc ` , ` Arc ` , ` alloc::rc::Weak ` and
101
+ ` alloc::sync::Weak ` types.
102
+ [ #9700 ] ( https://github.com/rust-lang/rust-clippy/pull/9700 )
103
+ * [ ` needless_borrowed_reference ` ] : Now works for struct and tuple patterns with wildcards
104
+ [ #9855 ] ( https://github.com/rust-lang/rust-clippy/pull/9855 )
105
+ * [ ` or_fun_call ` ] : Now supports ` map_or ` methods
106
+ [ #9689 ] ( https://github.com/rust-lang/rust-clippy/pull/9689 )
107
+ * [ ` unwrap_used ` ] , [ ` expect_used ` ] : No longer lints in test code
108
+ [ #9686 ] ( https://github.com/rust-lang/rust-clippy/pull/9686 )
109
+ * [ ` fn_params_excessive_bools ` ] : Is now emitted with the lint level at the linted function
110
+ [ #9698 ] ( https://github.com/rust-lang/rust-clippy/pull/9698 )
111
+
112
+ ### False Positive Fixes
113
+
114
+ * [ ` new_ret_no_self ` ] : No longer lints when ` impl Trait<Self> ` is returned
115
+ [ #9733 ] ( https://github.com/rust-lang/rust-clippy/pull/9733 )
116
+ * [ ` unnecessary_lazy_evaluations ` ] : No longer lints, if the type has a significant drop
117
+ [ #9750 ] ( https://github.com/rust-lang/rust-clippy/pull/9750 )
118
+ * [ ` option_if_let_else ` ] : No longer lints, if any arm has guard
119
+ [ #9747 ] ( https://github.com/rust-lang/rust-clippy/pull/9747 )
120
+ * [ ` explicit_auto_deref ` ] : No longer lints, if the target type is a projection with generic
121
+ arguments
122
+ [ #9813 ] ( https://github.com/rust-lang/rust-clippy/pull/9813 )
123
+ * [ ` unnecessary_to_owned ` ] : No longer lints, if the suggestion effects types
124
+ [ #9796 ] ( https://github.com/rust-lang/rust-clippy/pull/9796 )
125
+ * [ ` needless_borrow ` ] : No longer lints, if the suggestion is affected by ` Deref `
126
+ [ #9674 ] ( https://github.com/rust-lang/rust-clippy/pull/9674 )
127
+ * [ ` unused_unit ` ] : No longer lints, if lifetimes are bound to the return type
128
+ [ #9849 ] ( https://github.com/rust-lang/rust-clippy/pull/9849 )
129
+ * [ ` mut_mut ` ] : No longer lints cases with unsized mutable references
130
+ [ #9835 ] ( https://github.com/rust-lang/rust-clippy/pull/9835 )
131
+ * [ ` bool_to_int_with_if ` ] : No longer lints in const context
132
+ [ #9738 ] ( https://github.com/rust-lang/rust-clippy/pull/9738 )
133
+ * [ ` use_self ` ] : No longer lints in macros
134
+ [ #9704 ] ( https://github.com/rust-lang/rust-clippy/pull/9704 )
135
+ * [ ` unnecessary_operation ` ] : No longer lints, if multiple macros are involved
136
+ [ #9981 ] ( https://github.com/rust-lang/rust-clippy/pull/9981 )
137
+ * [ ` allow_attributes_without_reason ` ] : No longer lints inside external macros
138
+ [ #9630 ] ( https://github.com/rust-lang/rust-clippy/pull/9630 )
139
+ * [ ` question_mark ` ] : No longer lints for ` if let Err() ` with an ` else ` branch
140
+ [ #9722 ] ( https://github.com/rust-lang/rust-clippy/pull/9722 )
141
+ * [ ` unnecessary_cast ` ] : No longer lints if the identifier and cast originate from different macros
142
+ [ #9980 ] ( https://github.com/rust-lang/rust-clippy/pull/9980 )
143
+ * [ ` arithmetic_side_effects ` ] : Now detects operations with associated constants
144
+ [ #9592 ] ( https://github.com/rust-lang/rust-clippy/pull/9592 )
145
+ * [ ` explicit_auto_deref ` ] : No longer lints, if the initial value is not a reference or reference
146
+ receiver
147
+ [ #9997 ] ( https://github.com/rust-lang/rust-clippy/pull/9997 )
148
+ * [ ` module_name_repetitions ` ] , [ ` single_component_path_imports ` ] : Now handle ` #[allow] `
149
+ attributes correctly
150
+ [ #9879 ] ( https://github.com/rust-lang/rust-clippy/pull/9879 )
151
+ * [ ` bool_to_int_with_if ` ] : No longer lints ` if let ` statements
152
+ [ #9714 ] ( https://github.com/rust-lang/rust-clippy/pull/9714 )
153
+ * [ ` needless_borrow ` ] : No longer lints, ` if ` -` else ` -statements that require the borrow
154
+ [ #9791 ] ( https://github.com/rust-lang/rust-clippy/pull/9791 )
155
+ * [ ` needless_borrow ` ] : No longer lints borrows, if moves were illegal
156
+ [ #9711 ] ( https://github.com/rust-lang/rust-clippy/pull/9711 )
157
+ * [ ` manual_swap ` ] : No longer lints in const context
158
+ [ #9871 ] ( https://github.com/rust-lang/rust-clippy/pull/9871 )
159
+
160
+ ### Suggestion Fixes/Improvements
161
+
162
+ * [ ` missing_safety_doc ` ] , [ ` missing_errors_doc ` ] , [ ` missing_panics_doc ` ] : No longer show the
163
+ entire item in the lint emission.
164
+ [ #9772 ] ( https://github.com/rust-lang/rust-clippy/pull/9772 )
165
+ * [ ` needless_lifetimes ` ] : Only suggests ` '_ ` when it's applicable
166
+ [ #9743 ] ( https://github.com/rust-lang/rust-clippy/pull/9743 )
167
+ * [ ` use_self ` ] : Now suggests full paths correctly
168
+ [ #9726 ] ( https://github.com/rust-lang/rust-clippy/pull/9726 )
169
+ * [ ` redundant_closure_call ` ] : Now correctly deals with macros during suggestion creation
170
+ [ #9987 ] ( https://github.com/rust-lang/rust-clippy/pull/9987 )
171
+ * [ ` unnecessary_cast ` ] : Suggestions now correctly deal with references
172
+ [ #9996 ] ( https://github.com/rust-lang/rust-clippy/pull/9996 )
173
+ * [ ` unnecessary_join ` ] : Suggestions now correctly use [ turbofish] operators
174
+ [ #9779 ] ( https://github.com/rust-lang/rust-clippy/pull/9779 )
175
+ * [ ` equatable_if_let ` ] : Can now suggest ` matches! ` replacements
176
+ [ #9368 ] ( https://github.com/rust-lang/rust-clippy/pull/9368 )
177
+ * [ ` string_extend_chars ` ] : Suggestions now correctly work for ` str ` slices
178
+ [ #9741 ] ( https://github.com/rust-lang/rust-clippy/pull/9741 )
179
+ * [ ` redundant_closure_for_method_calls ` ] : Suggestions now include angle brackets and generic
180
+ arguments if needed
181
+ [ #9745 ] ( https://github.com/rust-lang/rust-clippy/pull/9745 )
182
+ * [ ` manual_let_else ` ] : Suggestions no longer expand macro calls
183
+ [ #9943 ] ( https://github.com/rust-lang/rust-clippy/pull/9943 )
184
+ * [ ` infallible_destructuring_match ` ] : Suggestions now preserve references
185
+ [ #9850 ] ( https://github.com/rust-lang/rust-clippy/pull/9850 )
186
+ * [ ` result_large_err ` ] : The error now shows the largest enum variant
187
+ [ #9662 ] ( https://github.com/rust-lang/rust-clippy/pull/9662 )
188
+ * [ ` needless_return ` ] : Suggestions are now formatted better
189
+ [ #9967 ] ( https://github.com/rust-lang/rust-clippy/pull/9967 )
190
+ * [ ` unused_rounding ` ] : The suggestion now preserves the original float literal notation
191
+ [ #9870 ] ( https://github.com/rust-lang/rust-clippy/pull/9870 )
192
+
193
+ [ turbofish ] : https://turbo.fish/::%3CClippy%3E
194
+
195
+ ### ICE Fixes
196
+
197
+ * [ ` result_large_err ` ] : Fixed ICE for empty enums
198
+ [ #10007 ] ( https://github.com/rust-lang/rust-clippy/pull/10007 )
199
+ * [ ` redundant_allocation ` ] : Fixed ICE for types with bounded variables
200
+ [ #9773 ] ( https://github.com/rust-lang/rust-clippy/pull/9773 )
201
+ * [ ` unused_rounding ` ] : Fixed ICE, if ` _ ` was used as a separator
202
+ [ #10001 ] ( https://github.com/rust-lang/rust-clippy/pull/10001 )
10
203
11
204
## Rust 1.66
12
205
13
- Current stable, released 2022-12-15
206
+ Released 2022-12-15
14
207
15
208
[ b52fb523...4f142aa1] ( https://github.com/rust-lang/rust-clippy/compare/b52fb523...4f142aa1 )
16
209
@@ -166,6 +359,7 @@ Current stable, released 2022-12-15
166
359
167
360
* [ ` unnecessary_to_owned ` ] : Avoid ICEs in favor of false negatives if information is missing
168
361
[ #9505 ] ( https://github.com/rust-lang/rust-clippy/pull/9505 )
362
+ [ #10027 ] ( https://github.com/rust-lang/rust-clippy/pull/10027 )
169
363
* [ ` manual_range_contains ` ] : No longer ICEs on values behind references
170
364
[ #9627 ] ( https://github.com/rust-lang/rust-clippy/pull/9627 )
171
365
* [ ` needless_pass_by_value ` ] : No longer ICEs on unsized ` dyn Fn ` arguments
@@ -4383,6 +4577,7 @@ Released 2018-09-13
4383
4577
[ `multi_assignments` ] : https://rust-lang.github.io/rust-clippy/master/index.html#multi_assignments
4384
4578
[ `multiple_crate_versions` ] : https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
4385
4579
[ `multiple_inherent_impl` ] : https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
4580
+ [ `multiple_unsafe_ops_per_block` ] : https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block
4386
4581
[ `must_use_candidate` ] : https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
4387
4582
[ `must_use_unit` ] : https://rust-lang.github.io/rust-clippy/master/index.html#must_use_unit
4388
4583
[ `mut_from_ref` ] : https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
0 commit comments