Skip to content

Commit 113c704

Browse files
committed
Auto merge of #10427 - xFrednet:changelog-1-68, r=Manishearth
Update version attribute for 1.68 lints Roses are red, violets are blue, I'm running out of rhymes, changelogs are crimes???? --- changelog: none <!-- changelog_checked -->
2 parents 2d9ca94 + 917ebc3 commit 113c704

File tree

6 files changed

+151
-6
lines changed

6 files changed

+151
-6
lines changed

CHANGELOG.md

+146-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,152 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

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 beta, 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)
10155

11156
## Rust 1.67
12157

clippy_lints/src/almost_complete_range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare_clippy_lint! {
2424
/// ```rust
2525
/// let _ = 'a'..='z';
2626
/// ```
27-
#[clippy::version = "1.63.0"]
27+
#[clippy::version = "1.68.0"]
2828
pub ALMOST_COMPLETE_RANGE,
2929
suspicious,
3030
"almost complete range"

clippy_lints/src/fn_null_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare_clippy_lint! {
2525
///
2626
/// if fn_ptr.is_none() { ... }
2727
/// ```
28-
#[clippy::version = "1.67.0"]
28+
#[clippy::version = "1.68.0"]
2929
pub FN_NULL_CHECK,
3030
correctness,
3131
"`fn()` type assumed to be nullable"

clippy_lints/src/permissions_set_readonly_false.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare_clippy_lint! {
2121
/// let mut permissions = metadata.permissions();
2222
/// permissions.set_readonly(false);
2323
/// ```
24-
#[clippy::version = "1.66.0"]
24+
#[clippy::version = "1.68.0"]
2525
pub PERMISSIONS_SET_READONLY_FALSE,
2626
suspicious,
2727
"Checks for calls to `std::fs::Permissions.set_readonly` with argument `false`"

clippy_lints/src/size_of_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ declare_clippy_lint! {
4545
/// }
4646
/// }
4747
/// ```
48-
#[clippy::version = "1.67.0"]
48+
#[clippy::version = "1.68.0"]
4949
pub SIZE_OF_REF,
5050
suspicious,
5151
"Argument to `std::mem::size_of_val()` is a double-reference, which is almost certainly unintended"

clippy_lints/src/transmute/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ declare_clippy_lint! {
458458
/// ```rust
459459
/// let null_fn: Option<fn()> = None;
460460
/// ```
461-
#[clippy::version = "1.67.0"]
461+
#[clippy::version = "1.68.0"]
462462
pub TRANSMUTE_NULL_TO_FN,
463463
correctness,
464464
"transmute results in a null function pointer, which is undefined behavior"

0 commit comments

Comments
 (0)