@@ -6,7 +6,108 @@ document.
6
6
7
7
## Unreleased / In Rust Nightly
8
8
9
- [ 57b3c4b...master] ( https://github.com/rust-lang/rust-clippy/compare/57b3c4b...master )
9
+ [ d0cf3481...master] ( https://github.com/rust-lang/rust-clippy/compare/d0cf3481...master )
10
+
11
+ ## Rust 1.61 (beta)
12
+
13
+ Current beta, released 2022-05-19
14
+
15
+ [ 57b3c4b...d0cf3481] ( https://github.com/rust-lang/rust-clippy/compare/57b3c4b...d0cf3481 )
16
+
17
+ ### New Lints
18
+
19
+ * [ ` only_used_in_recursion ` ]
20
+ [ #8422 ] ( https://github.com/rust-lang/rust-clippy/pull/8422 )
21
+ * [ ` cast_enum_truncation ` ]
22
+ [ #8381 ] ( https://github.com/rust-lang/rust-clippy/pull/8381 )
23
+ * [ ` missing_spin_loop ` ]
24
+ [ #8174 ] ( https://github.com/rust-lang/rust-clippy/pull/8174 )
25
+ * [ ` deref_by_slicing ` ]
26
+ [ #8218 ] ( https://github.com/rust-lang/rust-clippy/pull/8218 )
27
+ * [ ` needless_match ` ]
28
+ [ #8471 ] ( https://github.com/rust-lang/rust-clippy/pull/8471 )
29
+ * [ ` allow_attributes_without_reason ` ] (Requires ` #![feature(lint_reasons)] ` )
30
+ [ #8504 ] ( https://github.com/rust-lang/rust-clippy/pull/8504 )
31
+ * [ ` print_in_format_impl ` ]
32
+ [ #8253 ] ( https://github.com/rust-lang/rust-clippy/pull/8253 )
33
+ * [ ` unnecessary_find_map ` ]
34
+ [ #8489 ] ( https://github.com/rust-lang/rust-clippy/pull/8489 )
35
+ * [ ` or_then_unwrap ` ]
36
+ [ #8561 ] ( https://github.com/rust-lang/rust-clippy/pull/8561 )
37
+ * [ ` unnecessary_join ` ]
38
+ [ #8579 ] ( https://github.com/rust-lang/rust-clippy/pull/8579 )
39
+ * [ ` iter_with_drain ` ]
40
+ [ #8483 ] ( https://github.com/rust-lang/rust-clippy/pull/8483 )
41
+ * [ ` cast_enum_constructor ` ]
42
+ [ #8562 ] ( https://github.com/rust-lang/rust-clippy/pull/8562 )
43
+ * [ ` cast_slice_different_sizes ` ]
44
+ [ #8445 ] ( https://github.com/rust-lang/rust-clippy/pull/8445 )
45
+
46
+ ### Moves and Deprecations
47
+
48
+ * Moved [ ` transmute_undefined_repr ` ] to ` nursery ` (now allow-by-default)
49
+ [ #8432 ] ( https://github.com/rust-lang/rust-clippy/pull/8432 )
50
+ * Moved [ ` try_err ` ] to ` restriction `
51
+ [ #8544 ] ( https://github.com/rust-lang/rust-clippy/pull/8544 )
52
+ * Move [ ` iter_with_drain ` ] to ` nursery `
53
+ [ #8541 ] ( https://github.com/rust-lang/rust-clippy/pull/8541 )
54
+ * Renamed ` to_string_in_display ` to [ ` recursive_format_impl ` ]
55
+ [ #8188 ] ( https://github.com/rust-lang/rust-clippy/pull/8188 )
56
+
57
+ ### Enhancements
58
+
59
+ * [ ` dbg_macro ` ] : The lint level can now be set with crate attributes and works inside macros
60
+ [ #8411 ] ( https://github.com/rust-lang/rust-clippy/pull/8411 )
61
+ * [ ` ptr_as_ptr ` ] : Now works inside macros
62
+ [ #8442 ] ( https://github.com/rust-lang/rust-clippy/pull/8442 )
63
+ * [ ` use_self ` ] : Now works for variants in match expressions
64
+ [ #8456 ] ( https://github.com/rust-lang/rust-clippy/pull/8456 )
65
+ * [ ` await_holding_lock ` ] : Now lints for ` parking_lot::{Mutex, RwLock} `
66
+ [ #8419 ] ( https://github.com/rust-lang/rust-clippy/pull/8419 )
67
+ * [ ` recursive_format_impl ` ] : Now checks for format calls on ` self `
68
+ [ #8188 ] ( https://github.com/rust-lang/rust-clippy/pull/8188 )
69
+
70
+ ### False Positive Fixes
71
+
72
+ * [ ` new_without_default ` ] : No longer lints for ` new() ` methods with ` #[doc(hidden)] `
73
+ [ #8472 ] ( https://github.com/rust-lang/rust-clippy/pull/8472 )
74
+ * [ ` transmute_undefined_repr ` ] : No longer lints for single field structs with ` #[repr(C)] ` ,
75
+ generic parameters, wide pointers, unions, tuples and allow several forms of type erasure
76
+ [ #8425 ] ( https://github.com/rust-lang/rust-clippy/pull/8425 )
77
+ [ #8553 ] ( https://github.com/rust-lang/rust-clippy/pull/8553 )
78
+ [ #8440 ] ( https://github.com/rust-lang/rust-clippy/pull/8440 )
79
+ [ #8547 ] ( https://github.com/rust-lang/rust-clippy/pull/8547 )
80
+ * [ ` match_single_binding ` ] , [ ` match_same_arms ` ] , [ ` match_as_ref ` ] , [ ` match_bool ` ] : No longer
81
+ lint ` match ` expressions with ` cfg ` ed arms
82
+ [ #8443 ] ( https://github.com/rust-lang/rust-clippy/pull/8443 )
83
+ * [ ` single_component_path_imports ` ] : No longer lint on macros
84
+ [ #8537 ] ( https://github.com/rust-lang/rust-clippy/pull/8537 )
85
+ * [ ` ptr_arg ` ] : Allow ` &mut ` arguments for ` Cow<_> `
86
+ [ #8552 ] ( https://github.com/rust-lang/rust-clippy/pull/8552 )
87
+ * [ ` needless_borrow ` ] : No longer lints for method calls
88
+ [ #8441 ] ( https://github.com/rust-lang/rust-clippy/pull/8441 )
89
+ * [ ` match_same_arms ` ] : Now ensures that interposing arm patterns don't overlap
90
+ [ #8232 ] ( https://github.com/rust-lang/rust-clippy/pull/8232 )
91
+ * [ ` default_trait_access ` ] : Now allows ` Default::default ` in update expressions
92
+ [ #8433 ] ( https://github.com/rust-lang/rust-clippy/pull/8433 )
93
+
94
+ ### Suggestion Fixes/Improvements
95
+
96
+ * [ ` redundant_slicing ` ] : Fixed suggestion for a method calls
97
+ [ #8218 ] ( https://github.com/rust-lang/rust-clippy/pull/8218 )
98
+ * [ ` map_flatten ` ] : Long suggestions will now be split up into two help messages
99
+ [ #8520 ] ( https://github.com/rust-lang/rust-clippy/pull/8520 )
100
+ * [ ` unnecessary_lazy_evaluations ` ] : Now shows suggestions for longer code snippets
101
+ [ #8543 ] ( https://github.com/rust-lang/rust-clippy/pull/8543 )
102
+ * [ ` unnecessary_sort_by ` ] : Now suggests ` Reverse ` including the path
103
+ [ #8462 ] ( https://github.com/rust-lang/rust-clippy/pull/8462 )
104
+ * [ ` search_is_some ` ] : More suggestions are now ` MachineApplicable `
105
+ [ #8536 ] ( https://github.com/rust-lang/rust-clippy/pull/8536 )
106
+
107
+ ### Documentation Improvements
108
+
109
+ * [ ` new_without_default ` ] : Document ` pub ` requirement for the struct and fields
110
+ [ #8429 ] ( https://github.com/rust-lang/rust-clippy/pull/8429 )
10
111
11
112
## Rust 1.60
12
113
@@ -3182,6 +3283,7 @@ Released 2018-09-13
3182
3283
[ `assign_op_pattern` ] : https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
3183
3284
[ `assign_ops` ] : https://rust-lang.github.io/rust-clippy/master/index.html#assign_ops
3184
3285
[ `async_yields_async` ] : https://rust-lang.github.io/rust-clippy/master/index.html#async_yields_async
3286
+ [ `await_holding_invalid_type` ] : https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type
3185
3287
[ `await_holding_lock` ] : https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
3186
3288
[ `await_holding_refcell_ref` ] : https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref
3187
3289
[ `bad_bit_mask` ] : https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
@@ -3198,6 +3300,7 @@ Released 2018-09-13
3198
3300
[ `boxed_local` ] : https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
3199
3301
[ `branches_sharing_code` ] : https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
3200
3302
[ `builtin_type_shadow` ] : https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
3303
+ [ `bytes_count_to_len` ] : https://rust-lang.github.io/rust-clippy/master/index.html#bytes_count_to_len
3201
3304
[ `bytes_nth` ] : https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
3202
3305
[ `cargo_common_metadata` ] : https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata
3203
3306
[ `case_sensitive_file_extension_comparisons` ] : https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons
@@ -3262,6 +3365,7 @@ Released 2018-09-13
3262
3365
[ `duplicate_underscore_argument` ] : https://rust-lang.github.io/rust-clippy/master/index.html#duplicate_underscore_argument
3263
3366
[ `duration_subsec` ] : https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec
3264
3367
[ `else_if_without_else` ] : https://rust-lang.github.io/rust-clippy/master/index.html#else_if_without_else
3368
+ [ `empty_drop` ] : https://rust-lang.github.io/rust-clippy/master/index.html#empty_drop
3265
3369
[ `empty_enum` ] : https://rust-lang.github.io/rust-clippy/master/index.html#empty_enum
3266
3370
[ `empty_line_after_outer_attr` ] : https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
3267
3371
[ `empty_loop` ] : https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
@@ -3314,6 +3418,7 @@ Released 2018-09-13
3314
3418
[ `forget_non_drop` ] : https://rust-lang.github.io/rust-clippy/master/index.html#forget_non_drop
3315
3419
[ `forget_ref` ] : https://rust-lang.github.io/rust-clippy/master/index.html#forget_ref
3316
3420
[ `format_in_format_args` ] : https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args
3421
+ [ `format_push_string` ] : https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
3317
3422
[ `from_iter_instead_of_collect` ] : https://rust-lang.github.io/rust-clippy/master/index.html#from_iter_instead_of_collect
3318
3423
[ `from_over_into` ] : https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
3319
3424
[ `from_str_radix_10` ] : https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10
@@ -3356,6 +3461,7 @@ Released 2018-09-13
3356
3461
[ `invalid_regex` ] : https://rust-lang.github.io/rust-clippy/master/index.html#invalid_regex
3357
3462
[ `invalid_upcast_comparisons` ] : https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons
3358
3463
[ `invisible_characters` ] : https://rust-lang.github.io/rust-clippy/master/index.html#invisible_characters
3464
+ [ `is_digit_ascii_radix` ] : https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
3359
3465
[ `items_after_statements` ] : https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
3360
3466
[ `iter_cloned_collect` ] : https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
3361
3467
[ `iter_count` ] : https://rust-lang.github.io/rust-clippy/master/index.html#iter_count
@@ -3372,6 +3478,7 @@ Released 2018-09-13
3372
3478
[ `large_const_arrays` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_const_arrays
3373
3479
[ `large_digit_groups` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
3374
3480
[ `large_enum_variant` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
3481
+ [ `large_include_file` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_include_file
3375
3482
[ `large_stack_arrays` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_stack_arrays
3376
3483
[ `large_types_passed_by_value` ] : https://rust-lang.github.io/rust-clippy/master/index.html#large_types_passed_by_value
3377
3484
[ `len_without_is_empty` ] : https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
@@ -3472,6 +3579,7 @@ Released 2018-09-13
3472
3579
[ `needless_lifetimes` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
3473
3580
[ `needless_match` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_match
3474
3581
[ `needless_option_as_deref` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
3582
+ [ `needless_option_take` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_take
3475
3583
[ `needless_pass_by_value` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
3476
3584
[ `needless_question_mark` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
3477
3585
[ `needless_range_loop` ] : https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
@@ -3527,6 +3635,7 @@ Released 2018-09-13
3527
3635
[ `ptr_eq` ] : https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
3528
3636
[ `ptr_offset_with_cast` ] : https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
3529
3637
[ `pub_enum_variant_names` ] : https://rust-lang.github.io/rust-clippy/master/index.html#pub_enum_variant_names
3638
+ [ `pub_use` ] : https://rust-lang.github.io/rust-clippy/master/index.html#pub_use
3530
3639
[ `question_mark` ] : https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
3531
3640
[ `range_minus_one` ] : https://rust-lang.github.io/rust-clippy/master/index.html#range_minus_one
3532
3641
[ `range_plus_one` ] : https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one
@@ -3627,6 +3736,7 @@ Released 2018-09-13
3627
3736
[ `transmute_undefined_repr` ] : https://rust-lang.github.io/rust-clippy/master/index.html#transmute_undefined_repr
3628
3737
[ `transmutes_expressible_as_ptr_casts` ] : https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts
3629
3738
[ `transmuting_null` ] : https://rust-lang.github.io/rust-clippy/master/index.html#transmuting_null
3739
+ [ `trim_split_whitespace` ] : https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace
3630
3740
[ `trivial_regex` ] : https://rust-lang.github.io/rust-clippy/master/index.html#trivial_regex
3631
3741
[ `trivially_copy_pass_by_ref` ] : https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
3632
3742
[ `try_err` ] : https://rust-lang.github.io/rust-clippy/master/index.html#try_err
@@ -3650,6 +3760,7 @@ Released 2018-09-13
3650
3760
[ `unnecessary_lazy_evaluations` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
3651
3761
[ `unnecessary_mut_passed` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
3652
3762
[ `unnecessary_operation` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
3763
+ [ `unnecessary_owned_empty_strings` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_owned_empty_strings
3653
3764
[ `unnecessary_self_imports` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_self_imports
3654
3765
[ `unnecessary_sort_by` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by
3655
3766
[ `unnecessary_to_owned` ] : https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
0 commit comments