Ada Alakbarova
3bef3ff3d4
refactor(rc_buffer): remove RcKind
...
not really necessary
2025-11-14 12:03:05 +01:00
llogiq
663ef9b31b
fix(rc_buffer): don't touch the path to Rc/Arc in the suggestion ( #15803 )
...
Fixes https://github.com/rust-lang/rust-clippy/issues/15802
changelog: [`rc_buffer`]: don't touch the path to `Rc`/`Arc` in the
suggestion
2025-11-14 09:52:59 +00:00
Samuel Tardieu
4016c0fdb8
Add documentation for clippy_utils::numeric_literal ( #16078 )
...
For rust-lang/rust-clippy#15569
changelog: none
2025-11-13 22:48:54 +00:00
Fernando Valentim Torres
44700b962e
add documentation comments for clippy_utils::numeric_literal
2025-11-13 15:57:58 -03:00
Samuel Tardieu
801e5b3cc0
Fix website history interactions ( #16060 )
...
cc @GuillaumeGomez
- Searching/filtering no longer creates a new history entry per
keystroke/change
- Loading a URL with a specified search query now works. The search is
now stored as `?search=foo` instead of `#/foo`, not a breaking change
since this didn't work before
- The browser back/forward actions now update the filters/search and
displayed lints
The bulk of the changes are to support that last one, previously the
filter state was stored both in the DOM and as JS objects. The DOM is
now the single source of truth
changelog: none
2025-11-13 08:56:08 +00:00
Timo
0ac66461bb
refactor(needless_arbitrary_self_type): give suggestions with finer diffs ( #16005 )
...
changelog: [`needless_arbitrary_self_type`]: give suggestions with finer
diffs
2025-11-12 20:49:39 +00:00
Philipp Krones
da2a220a2e
incompatible_msrv: Don't check the contents of any std macro. (#16083 )
...
cc rust-lang/rust#148190 @flip1995 @RalfJung
This is a bit of a hack in that it hardcodes the list of crates with
stability attributes. This shouldn't be a big deal since that isn't a
set that changes very frequently and an internal lint could detect when
that happens.
The `fixme`s added aren't new issues and shouldn't get in the way of
unblocking the upstream issue.
changelog: none
2025-11-12 17:22:17 +00:00
Jason Newcomb
a537e86e7f
incompatible_msrv: Don't check the contents of any std macro.
2025-11-12 12:01:16 -05:00
Samuel Tardieu
d599529223
Fix single_range_in_vec_init FP for explicit Range ( #16043 )
...
Closes rust-lang/rust-clippy#16042
Closes rust-lang/rust-clippy#16044
changelog: [`single_range_in_vec_init`] fix FP for explicit `Range`
2025-11-11 10:28:46 +00:00
llogiq
0b30af05dc
Fix useless_let_if_seq FN when if is in the last expr of block ( #16063 )
...
Closes rust-lang/rust-clippy#16062
Closes rust-lang/rust-clippy#16064
changelog: [`useless_let_if_seq`] fix FN when `if` is in the last expr
of block
2025-11-10 23:54:24 +00:00
Linshu Yang
e1ac7da6a1
fix: useless_let_if_seq wrongly unmangled macros
2025-11-10 20:01:15 +00:00
Linshu Yang
8a1dde1449
fix: useless_let_if_seq FN when if is in the last expr of block
2025-11-10 19:30:50 +00:00
Linshu Yang
6834ab61b1
fix: single_range_in_vec_init wrongly unmangles macros
2025-11-10 17:25:01 +00:00
Linshu Yang
c8885d5313
fix: single_range_in_vec_init FP for explicit Range
2025-11-10 17:25:01 +00:00
Alex Macleod
4e35148a50
Fix website history interactions
2025-11-10 16:29:45 +00:00
dswij
3c3452a3b1
Fix mod_module_files false positive for tests in workspaces ( #16048 )
...
Workspaces don't have their integration tests in tests/ at the root, so
this check missed them.
This fixes rust-lang/rust-clippy#11775 for workspaces.
changelog: [`mod_module_files`]: Fix false positive for integration
tests in workspace crates.
2025-11-10 16:27:47 +00:00
Ada Alakbarova
a4a88ea592
refactor(needless_arbitrary_self_type): give suggestions with finer diffs
2025-11-08 19:48:32 +01:00
Jason Newcomb
d154da9773
chore(unnecessary_mut_passed): show the intention not to lint &raw references ( #16049 )
...
Supersedes https://github.com/rust-lang/rust-clippy/pull/15962
changelog: none
r? @Jarcho
2025-11-08 14:24:20 +00:00
Timo
ee4390f070
perf(manual_is_power_of_two): perform the is_integer_literal check first ( #16050 )
...
.. as it's much cheaper than `count_ones_receiver`
changelog: none
2025-11-08 12:11:30 +00:00
Ada Alakbarova
b59b2fdddb
chore(unnecessary_mut_passed): show the intention not to lint &raw references
2025-11-08 10:15:17 +01:00
Alex Macleod
6e3348906c
chore(unnecessary_map_on_constructor): clean-up ( #16051 )
...
- reduce indentation
- print constructor/method name in backticks
changelog: [`unnecessary_map_on_constructor`]: print constructor/method
name in backticks
2025-11-08 00:35:10 +00:00
Ada Alakbarova
21ddc50eec
chore(unnecessary_map_on_constructor): clean-up
...
- reduce indentation
- print constructor/method name in backticks
2025-11-07 22:14:03 +01:00
Ada Alakbarova
9147a36ba6
perf(manual_is_power_of_two): perform the is_integer_literal check first
...
.. as it's much cheaper than `count_ones_receiver`
2025-11-07 21:37:51 +01:00
Philipp Krones
dddaf0768c
Make bug report issue template more similar to that of rust-lang/rust ( #16047 )
...
It's always a bit jarring to be required to provide the expected output
first, as usually one starts with having the existing output, and
modifies that.
This commit reorders the two steps, and also gives them the same names
as `rust-lang/rust` for some extra consistency
changelog: none
2025-11-07 16:22:18 +00:00
Tom Fryers
da7bde794c
Fix mod_module_files FP for tests in workspaces
...
Workspaces don't have their integration tests in tests/ at the root, so
this check missed them.
2025-11-07 12:59:25 +00:00
Ada Alakbarova
e6a3dde496
Make bug report issue template more similar to that of rust-lang/rust
...
It's always a bit jarring to be required to provide the expected output
first, as usually one starts with having the existing output, and
modifies that.
This commit reorders the two steps, and also gives them the same names
as `rust-lang/rust` for some extra consistency
2025-11-07 08:26:12 +01:00
llogiq
8ed05abef3
Fix missing_asserts_for_indexing changes assert_eq to assert ( #16040 )
...
Closes rust-lang/rust-clippy#16026
changelog: [`missing_asserts_for_indexing`] fix wrongly changing
`assert_eq` to `assert`
2025-11-06 22:28:32 +00:00
Jason Newcomb
c004be44c8
Fix nonminimal_bool wrongly unmangled terms ( #16017 )
...
Closes rust-lang/rust-clippy#16014
changelog: [`nonminimal_bool`] fix wrongly unmangled terms
2025-11-06 18:26:11 +00:00
llogiq
36324e8e9c
Don't flag cfg(test) as multiple inherent impl ( #16041 )
...
changelog: [`multiple_inherent_impl`]: Don't flag cfg(test) impls as
repeats
fixes rust-lang/rust-clippy#13040
2025-11-06 18:25:48 +00:00
Alex Macleod
52a39998fa
Fix missing_inline_in_public_items fail to fulfill expect in --test build ( #15320 )
...
Closes rust-lang/rust-clippy#13394
changelog: [`missing_inline_in_public_items`] fix failure to fulfill
`expect` in `--test` build
2025-11-06 16:49:21 +00:00
Nick Drozd
8539de9ccf
Don't flag cfg(test) as multiple inherent impl
2025-11-06 09:49:10 -06:00
yanglsh
a86dd63818
Make missing_inline_in_public_items warn on executables
2025-11-06 15:29:30 +00:00
Linshu Yang
0ab135f9d0
fix: missing_asserts_for_indexing changes assert_eq to assert
2025-11-06 15:12:08 +00:00
llogiq
c95d95bf95
Fix match_single_binding suggests wrongly inside tuple ( #15539 )
...
Closes rust-lang/rust-clippy#15537
Closes rust-lang/rust-clippy#15840
changelog: [`match_single_binding`] fix wrong suggestions inside tuple
2025-11-06 11:01:03 +00:00
Linshu Yang
c100a0808b
fix: nonminimal_bool wrongly unmangled terms
2025-11-05 16:14:59 +00:00
Philipp Krones
8769afffe6
CI: do not run merge queue tests on tier 2 x86_64-apple-darwin ( #16035 )
...
x86_64-apple-darwin has been demoted to tier 2 since Rust 1.90.
Moreover, Github runners for macOS 14 on x86_64 are much slower than the
others.
changelog: none
r? flip1995
2025-11-05 09:27:37 +00:00
Samuel Tardieu
3dab273824
Do not run merge queue tests on tier 2 x86_64-apple-darwin
...
x86_64-apple-darwin has been demoted to tier 2 since Rust 1.90.
Moreover, Github runners for macOS 14 on x86_64 are much slower than the
others.
2025-11-05 09:35:10 +01:00
Samuel Tardieu
4eac58a0b0
Consider type conversion that won't overflow ( #15950 )
...
Fix rust-lang/rust-clippy#15943
```rust
pub fn from_days(days: u8) -> Duration {
Duration::from_secs(86400 * u64::from(days))
}
```
An initial foundation that can be used for future improvements. It is
been a while since I touched Clippy so feel free to indicate better
designs if applicable.
Looks like https://github.com/rust-lang/rust-clippy/pull/15342 will help
but it is unclear when it will be finished. This PR provides a partial
solution for the current time.
changelog: [`arithmetic_side_effects`]: Consider type conversion that
won't overflow
2025-11-05 08:07:35 +00:00
Philipp Krones
deff3fd050
CI: use macOS 14 instead of GitHub-deprecated macOS 13 in merge queue checks ( #16032 )
...
The "macos 13" runners are being phased out
(https://github.com/actions/runner-images/issues/13046 ).
Some jobs have started to fail in the CI while attempting a merge
because of the brownout period.
changelog: none
r? flip1995
2025-11-05 07:46:07 +00:00
Samuel Tardieu
0d6fdc089a
Use macOS 14 instead of GitHub-deprecated macOS 13
...
The "macos 13" runners are being phased out
(https://github.com/actions/runner-images/issues/13046 ).
2025-11-05 01:00:11 +01:00
Catherine Flores
ad7fc4f468
Fix missing_transmute_annotations example ( #16024 )
...
The "bad" example in the `missing_transmute_annotations` example didn't
actually trigger the lint and so wasn't a "bad" example. This PR
replaces it with an actual "bad" example.
It was discussed on zulip
[here](https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/missing_transmute_annotations/near/547657390 ).
changelog: Fix `missing_transmute_annotations` example
r? @Centri3
2025-11-03 19:38:41 +00:00
Guillaume Gomez
0afbb65bac
Remove no_run tags on missing_transmute_annotations code examples
2025-11-03 20:28:00 +01:00
Guillaume Gomez
8f9ef1cb8f
Fix missing_transmute_annotations example
2025-11-03 20:22:00 +01:00
Samuel Tardieu
a456519ce0
fix(let_and_return): disallow _any_ text between let and return ( #16006 )
...
Fixes https://github.com/rust-lang/rust-clippy/issues/15987
changelog: [`let_and_return`]: disallow _any_ text between let and
return
2025-11-02 09:28:39 +00:00
Samuel Tardieu
e121ab877e
Fix replace_box FP when the box is moved ( #15984 )
...
Closes rust-lang/rust-clippy#15968
changelog: [`replace_box`] fix FP when the box is moved
r? samueltardieu As you wish
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_SUMMARY_START -->
### Summary Notes
-
[Beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15984#issuecomment-3469127087 )
by [samueltardieu](https://github.com/samueltardieu )
*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html ) for details*
<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
2025-11-02 09:12:28 +00:00
Linshu Yang
098ded3160
fix: replace_box FP when the box is moved
2025-11-02 03:23:16 +00:00
llogiq
6729799845
Fix spacing typo in new inefficient_to_string info ( #15888 )
...
changelog: none
2025-11-01 22:11:09 +00:00
llogiq
8e8fe61198
Introduce helper functions for Some(x)/None patterns and expressions ( #15930 )
...
Reduces boilerplate a bit
changelog: none
2025-11-01 22:10:25 +00:00
Timo
31d8210a53
unused_enumerate_index: move to loops lint pass (#15279 )
...
Needed to split the lint crate.
Both the method and loop versions of the lint should also behave the
same now.
changelog: None
2025-11-01 19:39:44 +00:00
Ada Alakbarova
6bc8d214b4
fix(let_and_return): disallow _any_ text between let and return
2025-11-01 18:01:28 +01:00