@@ -6,11 +6,156 @@ document.
6
6
7
7
## Unreleased / Beta / In Rust Nightly
8
8
9
- [ d822110d...master] ( https://github.com/rust-lang/rust-clippy/compare/d822110d...master )
9
+ [ 7f27e2e7...master] ( https://github.com/rust-lang/rust-clippy/compare/7f27e2e7...master )
10
+
11
+ ## Rust 1.68
12
+
13
+ Current stable, released 2023-03-09
14
+
15
+ [ d822110d...7f27e2e7] ( https://github.com/rust-lang/rust-clippy/compare/d822110d...7f27e2e7 )
16
+
17
+ ### New Lints
18
+
19
+ * [ ` permissions_set_readonly_false ` ]
20
+ [ #10063 ] ( https://github.com/rust-lang/rust-clippy/pull/10063 )
21
+ * [ ` almost_complete_range ` ]
22
+ [ #10043 ] ( https://github.com/rust-lang/rust-clippy/pull/10043 )
23
+ * [ ` size_of_ref ` ]
24
+ [ #10098 ] ( https://github.com/rust-lang/rust-clippy/pull/10098 )
25
+ * [ ` semicolon_outside_block ` ]
26
+ [ #9826 ] ( https://github.com/rust-lang/rust-clippy/pull/9826 )
27
+ * [ ` semicolon_inside_block ` ]
28
+ [ #9826 ] ( https://github.com/rust-lang/rust-clippy/pull/9826 )
29
+ * [ ` transmute_null_to_fn ` ]
30
+ [ #10099 ] ( https://github.com/rust-lang/rust-clippy/pull/10099 )
31
+ * [ ` fn_null_check ` ]
32
+ [ #10099 ] ( https://github.com/rust-lang/rust-clippy/pull/10099 )
33
+
34
+ ### Moves and Deprecations
35
+
36
+ * Moved [ ` manual_clamp ` ] to ` nursery ` (Now allow-by-default)
37
+ [ #10101 ] ( https://github.com/rust-lang/rust-clippy/pull/10101 )
38
+ * Moved [ ` mutex_atomic ` ] to ` restriction `
39
+ [ #10115 ] ( https://github.com/rust-lang/rust-clippy/pull/10115 )
40
+ * Renamed ` derive_hash_xor_eq ` to [ ` derived_hash_with_manual_eq ` ]
41
+ [ #10184 ] ( https://github.com/rust-lang/rust-clippy/pull/10184 )
42
+
43
+ ### Enhancements
44
+
45
+ * [ ` collapsible_str_replace ` ] : Now takes MSRV into consideration. The minimal version is 1.58
46
+ [ #10047 ] ( https://github.com/rust-lang/rust-clippy/pull/10047 )
47
+ * [ ` unused_self ` ] : No longer lints, if the method body contains a ` todo!() ` call
48
+ [ #10166 ] ( https://github.com/rust-lang/rust-clippy/pull/10166 )
49
+ * [ ` derivable_impls ` ] : Now suggests deriving ` Default ` for enums with default unit variants
50
+ [ #10161 ] ( https://github.com/rust-lang/rust-clippy/pull/10161 )
51
+ * [ ` arithmetic_side_effects ` ] : Added two new config values
52
+ ` arithmetic-side-effects-allowed-binary ` and ` arithmetic-side-effects-allowed-unary `
53
+ to allow operation on user types
54
+ [ #9840 ] ( https://github.com/rust-lang/rust-clippy/pull/9840 )
55
+ * [ ` large_const_arrays ` ] , [ ` large_stack_arrays ` ] : avoid integer overflow when calculating
56
+ total array size
57
+ [ #10103 ] ( https://github.com/rust-lang/rust-clippy/pull/10103 )
58
+ * [ ` indexing_slicing ` ] : add new config ` suppress-restriction-lint-in-const ` to enable
59
+ restriction lints, even if the suggestion might not be applicable
60
+ [ #9920 ] ( https://github.com/rust-lang/rust-clippy/pull/9920 )
61
+ * [ ` needless_borrow ` ] , [ ` redundant_clone ` ] : Now track references better and detect more cases
62
+ [ #9701 ] ( https://github.com/rust-lang/rust-clippy/pull/9701 )
63
+ * [ ` derived_hash_with_manual_eq ` ] : Now allows ` #[derive(PartialEq)] ` with custom ` Hash `
64
+ implementations
65
+ [ #10184 ] ( https://github.com/rust-lang/rust-clippy/pull/10184 )
66
+ * [ ` manual_is_ascii_check ` ] : Now detects ranges with ` .contains() ` calls
67
+ [ #10053 ] ( https://github.com/rust-lang/rust-clippy/pull/10053 )
68
+ * [ ` transmuting_null ` ] : Now detects ` const ` pointers to all types
69
+ [ #10099 ] ( https://github.com/rust-lang/rust-clippy/pull/10099 )
70
+ * [ ` needless_return ` ] : Now detects more cases for returns of owned values
71
+ [ #10110 ] ( https://github.com/rust-lang/rust-clippy/pull/10110 )
72
+
73
+ ### False Positive Fixes
74
+
75
+ * [ ` field_reassign_with_default ` ] : No longer lints cases, where values are initializes from
76
+ closures capturing struct values
77
+ [ #10143 ] ( https://github.com/rust-lang/rust-clippy/pull/10143 )
78
+ * [ ` seek_to_start_instead_of_rewind ` ] : No longer lints, if the return of ` seek ` is used.
79
+ [ #10096 ] ( https://github.com/rust-lang/rust-clippy/pull/10096 )
80
+ * [ ` manual_filter ` ] : Now ignores if expressions where the else branch has side effects or
81
+ doesn't return ` None `
82
+ [ #10091 ] ( https://github.com/rust-lang/rust-clippy/pull/10091 )
83
+ * [ ` implicit_clone ` ] : No longer lints if the type doesn't implement clone
84
+ [ #10022 ] ( https://github.com/rust-lang/rust-clippy/pull/10022 )
85
+ * [ ` match_wildcard_for_single_variants ` ] : No longer lints on wildcards with a guard
86
+ [ #10056 ] ( https://github.com/rust-lang/rust-clippy/pull/10056 )
87
+ * [ ` drop_ref ` ] : No longer lints idiomatic expression in ` match ` arms
88
+ [ #10142 ] ( https://github.com/rust-lang/rust-clippy/pull/10142 )
89
+ * [ ` arithmetic_side_effects ` ] : No longer lints on corner cases with negative number literals
90
+ [ #9867 ] ( https://github.com/rust-lang/rust-clippy/pull/9867 )
91
+ * [ ` string_lit_as_bytes ` ] : No longer lints in scrutinies of ` match ` statements
92
+ [ #10012 ] ( https://github.com/rust-lang/rust-clippy/pull/10012 )
93
+ * [ ` manual_assert ` ] : No longer lints in ` else if ` statements
94
+ [ #10013 ] ( https://github.com/rust-lang/rust-clippy/pull/10013 )
95
+ * [ ` needless_return ` ] : don't lint when using ` do yeet `
96
+ [ #10109 ] ( https://github.com/rust-lang/rust-clippy/pull/10109 )
97
+ * All lints: No longer lint in enum discriminant values when the suggestion won't work in a
98
+ const context
99
+ [ #10008 ] ( https://github.com/rust-lang/rust-clippy/pull/10008 )
100
+ * [ ` single_element_loop ` ] : No longer lints, if the loop contains a ` break ` or ` continue `
101
+ [ #10162 ] ( https://github.com/rust-lang/rust-clippy/pull/10162 )
102
+ * [ ` uninlined_format_args ` ] : No longer suggests inlining arguments in ` assert! ` and
103
+ ` debug_assert! ` macros before 2021 edition
104
+ [ #10055 ] ( https://github.com/rust-lang/rust-clippy/pull/10055 )
105
+ * [ ` explicit_counter_loop ` ] : No longer ignores counter changes after ` continue ` expressions
106
+ [ #10094 ] ( https://github.com/rust-lang/rust-clippy/pull/10094 )
107
+ * [ ` from_over_into ` ] : No longer lints on opaque types
108
+ [ #9982 ] ( https://github.com/rust-lang/rust-clippy/pull/9982 )
109
+ * [ ` expl_impl_clone_on_copy ` ] : No longer lints on ` #[repr(packed)] ` structs with generic
110
+ parameters
111
+ [ #10189 ] ( https://github.com/rust-lang/rust-clippy/pull/10189 )
112
+
113
+ ### Suggestion Fixes/Improvements
114
+
115
+ * [ ` zero_ptr ` ] : Now suggests ` core:: ` paths for ` no_std ` crates
116
+ [ #10023 ] ( https://github.com/rust-lang/rust-clippy/pull/10023 )
117
+ * [ ` useless_conversion ` ] : Now suggests removing calls to ` into_iter() ` on an expression
118
+ implementing ` Iterator `
119
+ [ #10020 ] ( https://github.com/rust-lang/rust-clippy/pull/10020 )
120
+ * [ ` box_default ` ] : The suggestion now uses short paths
121
+ [ #10153 ] ( https://github.com/rust-lang/rust-clippy/pull/10153 )
122
+ * [ ` default_trait_access ` ] , [ ` clone_on_copy ` ] : The suggestion now uses short paths
123
+ [ #10160 ] ( https://github.com/rust-lang/rust-clippy/pull/10160 )
124
+ * [ ` comparison_to_empty ` ] : The suggestion now removes unused deref operations
125
+ [ #9962 ] ( https://github.com/rust-lang/rust-clippy/pull/9962 )
126
+ * [ ` manual_let_else ` ] : Suggestions for or-patterns now include required brackets.
127
+ [ #9966 ] ( https://github.com/rust-lang/rust-clippy/pull/9966 )
128
+ * [ ` match_single_binding ` ] : suggestion no longer introduces unneeded semicolons
129
+ [ #10060 ] ( https://github.com/rust-lang/rust-clippy/pull/10060 )
130
+ * [ ` case_sensitive_file_extension_comparisons ` ] : Now displays a suggestion with ` Path `
131
+ [ #10107 ] ( https://github.com/rust-lang/rust-clippy/pull/10107 )
132
+ * [ ` empty_structs_with_brackets ` ] : The suggestion is no longer machine applicable, to avoid
133
+ errors when accessing struct fields
134
+ [ #10141 ] ( https://github.com/rust-lang/rust-clippy/pull/10141 )
135
+ * [ ` identity_op ` ] : Removes borrows in the suggestion when needed
136
+ [ #10004 ] ( https://github.com/rust-lang/rust-clippy/pull/10004 )
137
+ * [ ` suboptimal_flops ` ] : The suggestion now includes parentheses when required
138
+ [ #10113 ] ( https://github.com/rust-lang/rust-clippy/pull/10113 )
139
+ * [ ` iter_kv_map ` ] : Now handles ` mut ` and reference annotations in the suggestion
140
+ [ #10159 ] ( https://github.com/rust-lang/rust-clippy/pull/10159 )
141
+ * [ ` redundant_static_lifetimes ` ] : The suggestion no longer removes ` mut ` from references
142
+ [ #10006 ] ( https://github.com/rust-lang/rust-clippy/pull/10006 )
143
+
144
+ ### ICE Fixes
145
+
146
+ * [ ` new_ret_no_self ` ] : Now avoids a stack overflow for ` impl Trait ` types
147
+ [ #10086 ] ( https://github.com/rust-lang/rust-clippy/pull/10086 )
148
+ * [ ` unnecessary_to_owned ` ] : Now handles compiler generated notes better
149
+ [ #10027 ] ( https://github.com/rust-lang/rust-clippy/pull/10027 )
150
+
151
+ ### Others
152
+
153
+ * ` SYSROOT ` and ` --sysroot ` can now be set at the same time
154
+ [ #10149 ] ( https://github.com/rust-lang/rust-clippy/pull/10149 )
10
155
11
156
## Rust 1.67
12
157
13
- Current stable, released 2023-01-26
158
+ Released 2023-01-26
14
159
15
160
[ 4f142aa1...d822110d] ( https://github.com/rust-lang/rust-clippy/compare/4f142aa1...d822110d )
16
161
@@ -4307,6 +4452,7 @@ Released 2018-09-13
4307
4452
[ `collapsible_if` ] : https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
4308
4453
[ `collapsible_match` ] : https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
4309
4454
[ `collapsible_str_replace` ] : https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace
4455
+ [ `collection_is_never_read` ] : https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read
4310
4456
[ `comparison_chain` ] : https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
4311
4457
[ `comparison_to_empty` ] : https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
4312
4458
[ `const_static_lifetime` ] : https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime
@@ -4497,6 +4643,7 @@ Released 2018-09-13
4497
4643
[ `let_underscore_must_use` ] : https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_must_use
4498
4644
[ `let_underscore_untyped` ] : https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_untyped
4499
4645
[ `let_unit_value` ] : https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
4646
+ [ `let_with_type_underscore` ] : https://rust-lang.github.io/rust-clippy/master/index.html#let_with_type_underscore
4500
4647
[ `linkedlist` ] : https://rust-lang.github.io/rust-clippy/master/index.html#linkedlist
4501
4648
[ `logic_bug` ] : https://rust-lang.github.io/rust-clippy/master/index.html#logic_bug
4502
4649
[ `lossy_float_literal` ] : https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal
@@ -4560,6 +4707,7 @@ Released 2018-09-13
4560
4707
[ `mismatching_type_param_order` ] : https://rust-lang.github.io/rust-clippy/master/index.html#mismatching_type_param_order
4561
4708
[ `misnamed_getters` ] : https://rust-lang.github.io/rust-clippy/master/index.html#misnamed_getters
4562
4709
[ `misrefactored_assign_op` ] : https://rust-lang.github.io/rust-clippy/master/index.html#misrefactored_assign_op
4710
+ [ `missing_assert_message` ] : https://rust-lang.github.io/rust-clippy/master/index.html#missing_assert_message
4563
4711
[ `missing_const_for_fn` ] : https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
4564
4712
[ `missing_docs_in_private_items` ] : https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
4565
4713
[ `missing_enforced_import_renames` ] : https://rust-lang.github.io/rust-clippy/master/index.html#missing_enforced_import_renames
@@ -4689,6 +4837,7 @@ Released 2018-09-13
4689
4837
[ `read_zero_byte_vec` ] : https://rust-lang.github.io/rust-clippy/master/index.html#read_zero_byte_vec
4690
4838
[ `recursive_format_impl` ] : https://rust-lang.github.io/rust-clippy/master/index.html#recursive_format_impl
4691
4839
[ `redundant_allocation` ] : https://rust-lang.github.io/rust-clippy/master/index.html#redundant_allocation
4840
+ [ `redundant_async_block` ] : https://rust-lang.github.io/rust-clippy/master/index.html#redundant_async_block
4692
4841
[ `redundant_clone` ] : https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
4693
4842
[ `redundant_closure` ] : https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
4694
4843
[ `redundant_closure_call` ] : https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
0 commit comments