Skip to content

Commit 3905f51

Browse files
committed
Auto merge of rust-lang#10073 - xFrednet:changelog-1-66, r=Alexendoo
Changelog 1.66 It's really nice to see a changelog with so many suggestion fixes and improvements. Not much else to say. This should be merged with the coming release on 2022-12-15. For the reviewer, please review it and approve it if it looks good. The merge should wait until the release :) --- changelog: none <!-- changelog_checked -->
2 parents f43e4f3 + 71019aa commit 3905f51

File tree

7 files changed

+178
-8
lines changed

7 files changed

+178
-8
lines changed

CHANGELOG.md

+172-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,181 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[b52fb523...master](https://github.com/rust-lang/rust-clippy/compare/b52fb523...master)
9+
[4f142aa1...master](https://github.com/rust-lang/rust-clippy/compare/4f142aa1...master)
10+
11+
## Rust 1.66
12+
13+
Current stable, released 2022-12-15
14+
15+
[b52fb523...4f142aa1](https://github.com/rust-lang/rust-clippy/compare/b52fb523...4f142aa1)
16+
17+
### New Lints
18+
19+
* [`manual_clamp`]
20+
[#9484](https://github.com/rust-lang/rust-clippy/pull/9484)
21+
* [`missing_trait_methods`]
22+
[#9670](https://github.com/rust-lang/rust-clippy/pull/9670)
23+
* [`unused_format_specs`]
24+
[#9637](https://github.com/rust-lang/rust-clippy/pull/9637)
25+
* [`iter_kv_map`]
26+
[#9409](https://github.com/rust-lang/rust-clippy/pull/9409)
27+
* [`manual_filter`]
28+
[#9451](https://github.com/rust-lang/rust-clippy/pull/9451)
29+
* [`box_default`]
30+
[#9511](https://github.com/rust-lang/rust-clippy/pull/9511)
31+
* [`implicit_saturating_add`]
32+
[#9549](https://github.com/rust-lang/rust-clippy/pull/9549)
33+
* [`as_ptr_cast_mut`]
34+
[#9572](https://github.com/rust-lang/rust-clippy/pull/9572)
35+
* [`disallowed_macros`]
36+
[#9495](https://github.com/rust-lang/rust-clippy/pull/9495)
37+
* [`partial_pub_fields`]
38+
[#9658](https://github.com/rust-lang/rust-clippy/pull/9658)
39+
* [`uninlined_format_args`]
40+
[#9233](https://github.com/rust-lang/rust-clippy/pull/9233)
41+
* [`cast_nan_to_int`]
42+
[#9617](https://github.com/rust-lang/rust-clippy/pull/9617)
43+
44+
### Moves and Deprecations
45+
46+
* `positional_named_format_parameters` was uplifted to rustc under the new name
47+
`named_arguments_used_positionally`
48+
[#8518](https://github.com/rust-lang/rust-clippy/pull/8518)
49+
* Moved [`implicit_saturating_sub`] to `style` (Now warn-by-default)
50+
[#9584](https://github.com/rust-lang/rust-clippy/pull/9584)
51+
* Moved `derive_partial_eq_without_eq` to `nursery` (now allow-by-default)
52+
[#9536](https://github.com/rust-lang/rust-clippy/pull/9536)
53+
54+
### Enhancements
55+
56+
* [`nonstandard_macro_braces`]: Now includes `matches!()` in the default lint config
57+
[#9471](https://github.com/rust-lang/rust-clippy/pull/9471)
58+
* [`suboptimal_flops`]: Now supports multiplication and subtraction operations
59+
[#9581](https://github.com/rust-lang/rust-clippy/pull/9581)
60+
* [`arithmetic_side_effects`]: Now detects cases with literals behind references
61+
[#9587](https://github.com/rust-lang/rust-clippy/pull/9587)
62+
* [`upper_case_acronyms`]: Now also checks enum names
63+
[#9580](https://github.com/rust-lang/rust-clippy/pull/9580)
64+
* [`needless_borrowed_reference`]: Now lints nested patterns
65+
[#9573](https://github.com/rust-lang/rust-clippy/pull/9573)
66+
* [`unnecessary_cast`]: Now works for non-trivial non-literal expressions
67+
[#9576](https://github.com/rust-lang/rust-clippy/pull/9576)
68+
* [`arithmetic_side_effects`]: Now detects operations with custom types
69+
[#9559](https://github.com/rust-lang/rust-clippy/pull/9559)
70+
* [`disallowed_methods`], [`disallowed_types`]: Not correctly lints types, functions and macros
71+
with the same path
72+
[#9495](https://github.com/rust-lang/rust-clippy/pull/9495)
73+
* [`self_named_module_files`], [`mod_module_files`]: Now take remapped path prefixes into account
74+
[#9475](https://github.com/rust-lang/rust-clippy/pull/9475)
75+
* [`bool_to_int_with_if`]: Now detects the inverse if case
76+
[#9476](https://github.com/rust-lang/rust-clippy/pull/9476)
77+
78+
### False Positive Fixes
79+
80+
* [`arithmetic_side_effects`]: Now allows operations that can't overflow
81+
[#9474](https://github.com/rust-lang/rust-clippy/pull/9474)
82+
* [`unnecessary_lazy_evaluations`]: No longer lints in external macros
83+
[#9486](https://github.com/rust-lang/rust-clippy/pull/9486)
84+
* [`needless_borrow`], [`explicit_auto_deref`]: No longer lint on unions that require the reference
85+
[#9490](https://github.com/rust-lang/rust-clippy/pull/9490)
86+
* [`almost_complete_letter_range`]: No longer lints in external macros
87+
[#9467](https://github.com/rust-lang/rust-clippy/pull/9467)
88+
* [`drop_copy`]: No longer lints on idiomatic cases in match arms
89+
[#9491](https://github.com/rust-lang/rust-clippy/pull/9491)
90+
* [`question_mark`]: No longer lints in const context
91+
[#9487](https://github.com/rust-lang/rust-clippy/pull/9487)
92+
* [`collapsible_if`]: Suggestion now work in macros
93+
[#9410](https://github.com/rust-lang/rust-clippy/pull/9410)
94+
* [`std_instead_of_core`]: No longer triggers on unstable modules
95+
[#9545](https://github.com/rust-lang/rust-clippy/pull/9545)
96+
* [`unused_peekable`]: No longer lints, if the peak is done in a closure or function
97+
[#9465](https://github.com/rust-lang/rust-clippy/pull/9465)
98+
* [`useless_attribute`]: No longer lints on `#[allow]` attributes for [`unsafe_removed_from_name`]
99+
[#9593](https://github.com/rust-lang/rust-clippy/pull/9593)
100+
* [`unnecessary_lazy_evaluations`]: No longer suggest switching to early evaluation when type has
101+
custom `Drop` implementation
102+
[#9551](https://github.com/rust-lang/rust-clippy/pull/9551)
103+
* [`unnecessary_cast`]: No longer lints on negative hexadecimal literals when cast as floats
104+
[#9609](https://github.com/rust-lang/rust-clippy/pull/9609)
105+
* [`use_self`]: No longer lints in proc macros
106+
[#9454](https://github.com/rust-lang/rust-clippy/pull/9454)
107+
* [`never_loop`]: Now takes `let ... else` statements into consideration.
108+
[#9496](https://github.com/rust-lang/rust-clippy/pull/9496)
109+
* [`default_numeric_fallback`]: Now ignores constants
110+
[#9636](https://github.com/rust-lang/rust-clippy/pull/9636)
111+
* [`uninit_vec`]: No longer lints `Vec::set_len(0)`
112+
[#9519](https://github.com/rust-lang/rust-clippy/pull/9519)
113+
* [`arithmetic_side_effects`]: Now ignores references to integer types
114+
[#9507](https://github.com/rust-lang/rust-clippy/pull/9507)
115+
* [`large_stack_arrays`]: No longer lints inside static items
116+
[#9466](https://github.com/rust-lang/rust-clippy/pull/9466)
117+
* [`ref_option_ref`]: No longer lints if the inner reference is mutable
118+
[#9684](https://github.com/rust-lang/rust-clippy/pull/9684)
119+
* [`ptr_arg`]: No longer lints if the argument is used as an incomplete trait object
120+
[#9645](https://github.com/rust-lang/rust-clippy/pull/9645)
121+
* [`should_implement_trait`]: Now also works for `default` methods
122+
[#9546](https://github.com/rust-lang/rust-clippy/pull/9546)
123+
124+
### Suggestion Fixes/Improvements
125+
126+
* [`derivable_impls`]: The suggestion is now machine applicable
127+
[#9429](https://github.com/rust-lang/rust-clippy/pull/9429)
128+
* [`match_single_binding`]: The suggestion now handles scrutinies with side effects better
129+
[#9601](https://github.com/rust-lang/rust-clippy/pull/9601)
130+
* [`zero_prefixed_literal`]: Only suggests using octal numbers, if this is possible
131+
[#9652](https://github.com/rust-lang/rust-clippy/pull/9652)
132+
* [`rc_buffer`]: The suggestion is no longer machine applicable to avoid semantic changes
133+
[#9633](https://github.com/rust-lang/rust-clippy/pull/9633)
134+
* [`print_literal`], [`write_literal`], [`uninlined_format_args`]: The suggestion now ignores
135+
comments after the macro call.
136+
[#9586](https://github.com/rust-lang/rust-clippy/pull/9586)
137+
* [`expect_fun_call`]:Improved the suggestion for `format!` calls with captured variables
138+
[#9586](https://github.com/rust-lang/rust-clippy/pull/9586)
139+
* [`nonstandard_macro_braces`]: The suggestion is now machine applicable and will no longer
140+
replace brackets inside the macro argument.
141+
[#9499](https://github.com/rust-lang/rust-clippy/pull/9499)
142+
* [`from_over_into`]: The suggestion is now a machine applicable and contains explanations
143+
[#9649](https://github.com/rust-lang/rust-clippy/pull/9649)
144+
* [`needless_return`]: The automatic suggestion now removes all required semicolons
145+
[#9497](https://github.com/rust-lang/rust-clippy/pull/9497)
146+
* [`to_string_in_format_args`]: The suggestion now keeps parenthesis around values
147+
[#9590](https://github.com/rust-lang/rust-clippy/pull/9590)
148+
* [`manual_assert`]: The suggestion now preserves comments
149+
[#9479](https://github.com/rust-lang/rust-clippy/pull/9479)
150+
* [`redundant_allocation`]: The suggestion applicability is now marked `MaybeIncorrect` to
151+
avoid semantic changes
152+
[#9634](https://github.com/rust-lang/rust-clippy/pull/9634)
153+
* [`assertions_on_result_states`]: The suggestion has been corrected, for cases where the
154+
`assert!` is not in a statement.
155+
[#9453](https://github.com/rust-lang/rust-clippy/pull/9453)
156+
* [`nonminimal_bool`]: The suggestion no longer expands macros
157+
[#9457](https://github.com/rust-lang/rust-clippy/pull/9457)
158+
* [`collapsible_match`]: Now specifies field names, when a struct is destructed
159+
[#9685](https://github.com/rust-lang/rust-clippy/pull/9685)
160+
* [`unnecessary_cast`]: The suggestion now adds parenthesis for negative numbers
161+
[#9577](https://github.com/rust-lang/rust-clippy/pull/9577)
162+
* [`redundant_closure`]: The suggestion now works for `impl FnMut` arguments
163+
[#9556](https://github.com/rust-lang/rust-clippy/pull/9556)
164+
165+
### ICE Fixes
166+
167+
* [`unnecessary_to_owned`]: Avoid ICEs in favor of false negatives if information is missing
168+
[#9505](https://github.com/rust-lang/rust-clippy/pull/9505)
169+
* [`manual_range_contains`]: No longer ICEs on values behind references
170+
[#9627](https://github.com/rust-lang/rust-clippy/pull/9627)
171+
* [`needless_pass_by_value`]: No longer ICEs on unsized `dyn Fn` arguments
172+
[#9531](https://github.com/rust-lang/rust-clippy/pull/9531)
173+
* `*_interior_mutable_const` lints: no longer ICE on const unions containing `!Freeze` types
174+
[#9539](https://github.com/rust-lang/rust-clippy/pull/9539)
175+
176+
### Others
177+
178+
* Released `rustc_tools_util` for version information on `Crates.io`. (Further adjustments will
179+
not be published as part of this changelog)
10180

11181
## Rust 1.65
12182

13-
Current stable, released 2022-11-03
183+
Released 2022-11-03
14184

15185
[3c7e7dbc...b52fb523](https://github.com/rust-lang/rust-clippy/compare/3c7e7dbc...b52fb523)
16186

clippy_lints/src/box_default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare_clippy_lint! {
3030
/// ```rust
3131
/// let x: Box<String> = Box::default();
3232
/// ```
33-
#[clippy::version = "1.65.0"]
33+
#[clippy::version = "1.66.0"]
3434
pub BOX_DEFAULT,
3535
perf,
3636
"Using Box::new(T::default()) instead of Box::default()"

clippy_lints/src/casts/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ declare_clippy_lint! {
641641
/// ```rust,ignore
642642
/// let _: = 0_u64;
643643
/// ```
644-
#[clippy::version = "1.64.0"]
644+
#[clippy::version = "1.66.0"]
645645
pub CAST_NAN_TO_INT,
646646
suspicious,
647647
"casting a known floating-point NaN into an integer"

clippy_lints/src/disallowed_macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ declare_clippy_lint! {
4747
/// value: usize,
4848
/// }
4949
/// ```
50-
#[clippy::version = "1.65.0"]
50+
#[clippy::version = "1.66.0"]
5151
pub DISALLOWED_MACROS,
5252
style,
5353
"use of a disallowed macro"

clippy_lints/src/format_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ declare_clippy_lint! {
123123
///
124124
/// If a format string contains a numbered argument that cannot be inlined
125125
/// nothing will be suggested, e.g. `println!("{0}={1}", var, 1+2)`.
126-
#[clippy::version = "1.65.0"]
126+
#[clippy::version = "1.66.0"]
127127
pub UNINLINED_FORMAT_ARGS,
128128
style,
129129
"using non-inlined variables in `format!` calls"

clippy_lints/src/implicit_saturating_add.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ declare_clippy_lint! {
3131
///
3232
/// u = u.saturating_add(1);
3333
/// ```
34-
#[clippy::version = "1.65.0"]
34+
#[clippy::version = "1.66.0"]
3535
pub IMPLICIT_SATURATING_ADD,
3636
style,
3737
"Perform saturating addition instead of implicitly checking max bound of data type"

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3059,7 +3059,7 @@ declare_clippy_lint! {
30593059
/// let map: HashMap<u32, u32> = HashMap::new();
30603060
/// let values = map.values().collect::<Vec<_>>();
30613061
/// ```
3062-
#[clippy::version = "1.65.0"]
3062+
#[clippy::version = "1.66.0"]
30633063
pub ITER_KV_MAP,
30643064
complexity,
30653065
"iterating on map using `iter` when `keys` or `values` would do"

0 commit comments

Comments
 (0)