Linshu Yang
9d08eb487b
fix: match_bool wrongly unmangled macros
2026-01-07 19:00:44 +00:00
Linshu Yang
0cfbe56d04
fix: match_as_ref wrongly unmangled macros
2026-01-07 19:00:44 +00:00
Linshu Yang
02e4f853ef
fix: unnecessary_fold wrongly unmangled macros
2026-01-07 19:00:44 +00:00
Linshu Yang
2617622015
fix: redundant_pattern_matching wrongly unmangled macros
2026-01-07 19:00:39 +00:00
Linshu Yang
15fc6cfd1c
fix: string_from_utf8_as_bytes wrongly unmangled macros
2026-01-07 19:00:22 +00:00
Linshu Yang
ac505cc2cb
fix: str_to_string wrongly unmangled macros
2026-01-07 19:00:22 +00:00
dswij
6c83a47592
Fix multiple_inherent_impl false negatives for generic impl blocks ( #16284 )
...
lint now correctly detects multiple impl blocks for generic types with
identical bounds. Fixes:
https://github.com/rust-lang/rust-clippy/issues/16283
changelog: [`multiple_inherent_impl`]: fix false negatives for generic
impl blocks
2026-01-04 18:57:10 +00:00
dswij
48821414b7
Fix: cmp_owned wrongly unmangled macros ( #16331 )
...
Closes rust-lang/rust-clippy#16322
changelog: [`cmp_owned`] fix wrongly unmangled macros
2026-01-03 16:13:07 +00:00
dswij
b527468041
Fix needless_for_each FN when for_each is in the expr of a block ( #16295 )
...
Closes rust-lang/rust-clippy#16294
changelog: [`needless_for_each`] fix FN when `for_each` is in the expr
of a block
2026-01-02 15:54:46 +00:00
llogiq
86eaeaadd9
Do not make suggestion machine-applicable if it may change semantics ( #16324 )
...
When suggesting to replace an iterator method by `.all()` or `.any()`,
make the suggestion at most `MaybeIncorrect` instead of
`MachineApplicable` and warn about the fact that semantics may change
because those two methods are short-circuiting.
Fixes rust-lang/rust-clippy#3351
----
changelog: [`unnecessary_fold`]: warn about possible semantics change
when suggesting the use of a short-circuiting operator
2026-01-02 07:42:18 +00:00
Linshu Yang
aa4ec54dfe
fix: cmp_owned wrongly unmangled macros
2026-01-02 04:52:22 +00:00
dswij
461f0608b7
transmuting_null: Check single expression const blocks and blocks (#16260 )
...
changelog: [`transmuting_null`]: now checks const blocks and blocks with
only a single expression
2026-01-01 15:22:55 +00:00
llogiq
f07c787b7a
Fix bool_assert_comparison suggests wrongly for macros ( #16280 )
...
Closes rust-lang/rust-clippy#16279
changelog: [`bool_assert_comparison`] fix wrong suggestions for macros
2026-01-01 15:14:49 +00:00
Samuel Tardieu
a390881bde
Do not make suggestion machine-applicable if it may change semantics
...
When suggesting to replace an iterator method by `.all()` or `.any()`,
make the suggestion at most `MaybeIncorrect` instead of
`MachineApplicable` and warn about the fact that semantics may change
because those two methods are short-circuiting.
2026-01-01 15:08:51 +01:00
llogiq
0a983a7edc
Fix new_without_default misses where clause in new ( #16268 )
...
Closes rust-lang/rust-clippy#16255
changelog: [`new_without_default`] fix suggestions missing where clause
in `new`
2026-01-01 12:19:40 +00:00
Jason Newcomb
7d41f1d7a4
Fix implicit_saturating_sub suggests wrongly on untyped int literal ( #16309 )
...
Closes rust-lang/rust-clippy#16307
changelog: [`implicit_saturating_sub`] fix wrong suggestions on untyped
int literal
2026-01-01 05:25:50 +00:00
Jason Newcomb
5a97a1733d
manual_div_ceil: Added check for variant x.next_multiple_of(y) / y (#16221 )
...
Suggest using `x.div_ceil(y)` instead of `x.next_multiple_of(y) / y`.
fixes rust-lang/rust-clippy#16219
changelog: [`manual_div_ceil`]: Added check for variant
`x.next_multiple_of(y) / y`
2026-01-01 05:10:49 +00:00
mnemonikr
c2f97d194f
Added check for next_multiple_of in manual_div_ceil
2025-12-31 13:54:48 -08:00
dswij
b2670b4a0a
Fix redundant_pattern_matching misses ) in suggestion span ( #16084 )
...
Closes rust-lang/rust-clippy#14989
changelog: [`redundant_pattern_matching`] fix missing `)` in suggestion
span
2025-12-30 12:55:16 +00:00
Linshu Yang
67a76f9fb5
fix: implicit_saturating_sub suggests wrongly on untyped int literal
2025-12-29 18:43:57 +00:00
dswij
7481abcc88
Various fixes for handling of macros ( #16296 )
...
Closes rust-lang/rust-clippy#16293
Also contains fixes of several other lints, on handling macros
changelog: [`checked_conversions`] fix wrongly unmangled macros
changelog: [`manual_ignore_case_cmp`] fix wrongly unmangled macros
changelog: [`manual_ilog2`] fix wrongly unmangled macros
changelog: [`needless_bool_assign`] fix wrongly unmangled macros
changelog: [`manual_is_multiple_of`] fix wrongly unmangled macros
2025-12-28 15:07:10 +00:00
Samuel Onoja
e12e19d98c
fix double_parens FP on macro repetition patterns
2025-12-26 03:44:09 +01:00
Samuel Onoja
ec9174248d
Fix multiple_inherent_impl false negatives for generic impl blocks
2025-12-26 03:02:29 +01:00
Philipp Krones
7f4b539293
Merge remote-tracking branch 'upstream/master' into rustup
2025-12-25 20:50:32 +01:00
irelaxcn
851a98e17e
Fix assertions_on_constants false positive when there is non-constant value in the condition expr
2025-12-25 00:44:17 +08:00
Jason Newcomb
31ea246611
Preserve explicit lifetime information when removing mut ( #16273 )
...
Rather than trying to reconstruct the reference type without the `mut`,
remove the `mut` itself so that user-inserted lifetime information is
preserved.
The message has been changed from "consider changing to [NON-MUT REF]"
to "remove this `mut`"
changelog: [`needless_pass_by_ref_mut`]: preserve user-provided lifetime
information
Fixes rust-lang/rust-clippy#16267
2025-12-24 07:56:39 +00:00
Jason Newcomb
00df684c8b
Fix result_large_err FN on closures ( #16277 )
...
Closes rust-lang/rust-clippy#16249
changelog: [`result_large_err`] fix FN on closures
2025-12-24 07:51:48 +00:00
Jason Newcomb
da2b154681
Fix obfuscated_if_else wrongly unmangled macros ( #16289 )
...
Closes rust-lang/rust-clippy#16288
changelog: [`obfuscated_if_else`] fix wrongly unmangled macros
2025-12-24 07:43:28 +00:00
Linshu Yang
6bc6509075
fix: manual_is_multiple_of wrongly unmangled macros
2025-12-24 00:21:23 +00:00
Linshu Yang
21eaa04df8
fix: needless_for_each FN when for_each is in the expr of a block
2025-12-24 00:09:43 +00:00
Linshu Yang
01b39655df
fix: needless_bool_assign wrongly unmangled macros
2025-12-23 23:53:17 +00:00
Linshu Yang
d30647b7f2
fix: manual_ilog2 wrongly unmangled macros
2025-12-23 23:13:13 +00:00
Linshu Yang
ffbdb578b0
fix: manual_ignore_case_cmp wrongly unmangled macros
2025-12-23 23:08:32 +00:00
Linshu Yang
bc943aa8ea
fix: checked_conversions wrongly unmangled macros
2025-12-23 22:55:19 +00:00
dswij
615ac5d0a1
Don't emit collapsible_else_if lint when all arms contain only if {} else {} expressions ( #16286 )
...
If two `if` arms contain only a single `if {..} else {..}` statement,
don't suggest a collapse as this can lead to less readable code.
Fixes rust-lang/rust-clippy#4971
changelog: [`collapsible_else_if`]: prevent emitting lint when the all
`if` arms contain only an `if {..} else {..}` expression.
2025-12-23 06:04:36 +00:00
Linshu Yang
12610b2ce8
fix: obfuscated_if_else wrongly unmangled macros
2025-12-23 05:01:10 +00:00
Ryan Ward
646f583b3a
fix: remove else-if collapse suggestion when all branches contain only an if {..} else {..} expression
...
If two `if` arms contain only a single `if {..} else {..}` statement,
don't suggest a collapse as this can lead to less readable code.
2025-12-22 22:14:06 +10:30
Samuel Tardieu
b193e4fa05
Fix use_self FP on type in const generics ( #16172 )
...
Closes rust-lang/rust-clippy#16164
changelog: [`use_self`] fix FP on type in const generics
2025-12-22 08:28:21 +00:00
Linshu Yang
3cf9fa5496
fix: result_large_err FN on closures
2025-12-21 22:29:53 +00:00
Linshu Yang
a4e8d41802
fix: cmp_null wrongly unmangled macros
2025-12-21 22:01:46 +00:00
Linshu Yang
1377de0f0e
fix: bool_assert_comparison suggests wrongly for macros
2025-12-21 21:40:36 +00:00
Samuel Tardieu
dcb19a0a1e
Use "parameter" instead of "argument" in the lint message
2025-12-21 22:36:26 +01:00
Matthias Krüger
fabe332045
Rollup merge of #149882 - RalfJung:miri-dep-build, r=Mark-Simulacrum
...
miri: add -Zbinary-dep-depinfo to dependency builds
Hopefully fixes https://github.com/rust-lang/rust/issues/149711
Cc ````@bjorn3````
2025-12-21 18:50:41 +01:00
dswij
b946ba1ad3
Fix if_then_some_else_none suggests wrongly when then ends with comment ( #16278 )
...
Closes rust-lang/rust-clippy#16269
changelog: [`if_then_some_else_none`] fix wrong suggestions when then
ends with comment
2025-12-21 15:04:17 +00:00
Linshu Yang
7ba8b145e8
fix: if_then_some_else_none suggests wrongly when then ends with comment
2025-12-20 22:43:47 +00:00
Linshu Yang
a2102a528c
fix: new_without_default misses where clause in new
2025-12-20 18:44:33 +00:00
Samuel Tardieu
c97d202d20
Preserve explicit lifetime information when removing mut
...
Rather than trying to reconstruct the reference type without the `mut`,
remove the `mut` itself so that user-inserted lifetime information is
preserved.
The message has been changed from "consider changing to [NON-MUT REF]"
to "remove this `mut`"
2025-12-20 10:04:40 +01:00
Samuel Tardieu
354adbce44
Do not attempt to use nth with non-usize argument
2025-12-20 09:21:42 +01:00
Samuel Tardieu
a55845cd61
Fix println_empty_string suggestion caused error ( #16201 )
...
Closes : rust-lang/rust-clippy#16167
changelog: [`println_empty_string`]: fix suggestion caused error when
there is a comma after arg.
Closes : rust-lang/rust-clippy#16251
changelog: [`writeln_empty_string`]: fix suggestion caused error when
there is a comma in the comment before arg.
2025-12-19 18:00:53 +00:00
irelaxcn
675fd681aa
Fix println_empty_string suggestion caused error when there is a , after arg.
...
Make `writeln_empty_string` don't provide an auto-fix suggestion when
there is a comment in the macro call span.
2025-12-20 01:38:31 +08:00