Commit graph

23958 commits

Author SHA1 Message Date
Jason Newcomb
53675ce061 Remove path_to_local 2025-10-10 23:09:26 -04:00
Jason Newcomb
3f686a074d Remove is_res_lang_ctor 2025-10-10 23:00:17 -04:00
Jason Newcomb
3ed7aa0d5f Remove path_def_id 2025-10-10 23:00:17 -04:00
Jason Newcomb
5b659ba0b4 Remove path_res 2025-10-10 22:51:33 -04:00
Jason Newcomb
53783de8f0 Remove MaybePath 2025-10-10 22:51:33 -04:00
Jason Newcomb
e1a4c90f61 Remove get_type_diagnostic_name 2025-10-10 22:47:41 -04:00
Jason Newcomb
083b1c1059 Remove is_type_lang_item 2025-10-10 22:44:01 -04:00
Jason Newcomb
fe13e0675a Remove is_type_ref_to_diagnostic_item 2025-10-10 22:41:10 -04:00
Jason Newcomb
4914f5908f Remove is_type_diagnostic_item 2025-10-10 22:41:10 -04:00
Jason Newcomb
cb32444ee6 Remove is_path_diagnostic_item 2025-10-10 22:30:57 -04:00
Jason Newcomb
d32ef64ed5 Remove is_path_lang_item 2025-10-10 22:30:57 -04:00
Jason Newcomb
748a593a7f Add new utils for defninition identification. 2025-10-10 22:30:25 -04:00
Samuel Tardieu
70d5c8c9e4
Autolabel PR touching declared_lints.rs with needs-fcp (#15859)
changelog: none
2025-10-10 20:09:34 +00:00
Samuel Tardieu
6a08a85b06
Autolabel PR touching declared_lints.rs with needs-fcp 2025-10-10 18:19:00 +02:00
Alejandra González
844fadbb7e
Check structs and enums for use_self (#15566)
Closes rust-lang/rust-clippy#15555

changelog: [`use_self`]: Check structs and enums
2025-10-09 23:42:49 +00:00
Nick Drozd
b71fe9254d Check structs and enums for use_self 2025-10-09 18:23:12 -05:00
Alejandra González
57913b4737
Honor allow/expect attributes on ADT and impl Clone nodes (#15849)
changelog: [`expl_impl_clone_on_copy`]: honor `allow`/`expect`
attributes on both the type declaration and the `impl`

Fixes rust-lang/rust-clippy#15842

r? @blyxyas
2025-10-09 22:09:37 +00:00
Alejandra González
77ce8b81f0
Mark blyxyas on vacation (#15856)
I'll still take care of my currently-assigned reviews.
Edit: Sorry Philipp, I forgot to r? ghost

changelog:none
2025-10-09 21:59:58 +00:00
llogiq
e6febbd13b
Add lint unnecessary_option_map_or_else (#14662)
changelog: [`unnecessary_option_map_or_else`]: Added lint
unnecessary_option_map_or_else. As suggested in the issue description,
the implementation takes as reference the issue
rust-lang/rust-clippy#7328. The tests for lints `option_if_let_else` and
`or_fun_call` needed to be adjusted to comply with new lint.
fixes rust-lang/rust-clippy#14588
2025-10-09 21:56:14 +00:00
blyxyas
343e7806ea Mark blyxyas on vacation 2025-10-09 23:54:11 +02:00
Timo
99b810634e
Cleanup: do not handle methods from several places (#15751)
Some methods lints were handled in the `methods` module outside the
`check_methods()` function.

changelog: none
2025-10-09 09:26:13 +00:00
Samuel Tardieu
c425389f18
Cleanup: do not handle methods from several places
Some methods lints were handled in the `methods` module outside the
`check_methods()` function.
2025-10-09 06:45:30 +02:00
Timo
e70b206665
chore: multipart_suggestions for manual_assert (#13787)
This should address
https://github.com/rust-lang/rust-clippy/issues/13099 for the let_unit
test.

changelog: [manual_assert]: Updated manual_assert to use
multipart_suggestions where appropriate
2025-10-08 21:32:11 +00:00
Samuel Tardieu
69bd890ff1
Honor allow/expect attributes on ADT and impl Clone nodes 2025-10-08 22:02:14 +02:00
Samuel Tardieu
c5a96d49e4
perf(get_unwrap): avoid calling is_type_diagnostic_item multiple times (#15847)
changelog: none
2025-10-08 19:43:59 +00:00
Ada Alakbarova
80b886e895
perf(get_unwrap): avoid calling is_type_diagnostic_item multiple times 2025-10-08 19:27:51 +02:00
Alex Macleod
7b0c3d02c8
refactor(obfuscated_if_else): make a bit more type-safe (#15846)
changelog: none
2025-10-08 16:58:54 +00:00
Ada Alakbarova
d1be6d810b
Make obfuscated_if_else a bit more type-safe 2025-10-08 18:29:29 +02:00
Scott Gerring
8ef90574a2
chore: update manual_assert span suggestions 2025-10-08 11:58:50 +01:00
Samuel Tardieu
30c73fef62
replace_box: clean-up a bit (#15834)
changelog: none
2025-10-07 17:03:03 +00:00
Ada Alakbarova
01d2adc2f9
replace get_box_inner_type with Ty::boxed_ty 2025-10-07 18:31:46 +02:00
Ada Alakbarova
e5e3bbd9a1
extend the let-chain 2025-10-07 18:31:46 +02:00
Samuel Tardieu
f110f3412d
Fix needless_continue FP when match type is not unit or never (#15547)
Closes rust-lang/rust-clippy#14550
Closes rust-lang/rust-clippy#15548

changelog: [`needless_continue`] fix FP when match type is not unit or
never
2025-10-07 16:24:56 +00:00
yanglsh
13bd9b5d0f fix: needless_continue wrongly unmangled macros 2025-10-08 00:03:48 +08:00
yanglsh
7117bd9a27 fix: needless_continue FP when match type is not unit or never 2025-10-08 00:03:48 +08:00
yanglsh
0415d96f1e Migrate needless_continue to late pass 2025-10-08 00:03:48 +08:00
Samuel Tardieu
0a2eeceefc
Add replace_box lint (#14953)
Adds a new lint that detects `var = Default::default()` when `var` is
`Box<T>` and `T` implements `Default`.

changelog: [`replace_box`]: new lint
2025-10-07 15:56:38 +00:00
dswij
ea54123fd4
fix(collapsible_match): exclude binding modes from struct field pattern suggestions (#15608)
Fixes https://github.com/rust-lang/rust-clippy/issues/13287

changelog: [`collapsible_match`]: exclude binding modes from struct
field pattern suggestions
2025-10-07 15:49:47 +00:00
+merlan #flirora
517ef604af Add replace_box lint 2025-10-07 11:33:54 -04:00
Timo
c1f61242e2
legacy_numeric_constants: add ctxt check for internal macro (#15816)
Fixes rust-lang/rust-clippy#15805

ICE bisects to 9457d640b7, which handles the span incorrectly when part
of the path originates from internal declarative macro.

changelog: none
2025-10-07 08:34:10 +00:00
Samuel Tardieu
f3c020cd55
Use expect for lint warnings (#15625)
changelog:none
2025-10-07 06:40:53 +00:00
Nick Drozd
5318883d75 Use expect for lint warnings 2025-10-06 20:17:12 -04:00
Samuel Tardieu
5b23bd479e
Remove no-rustfixes (#15827)
Remove no-rustfixes where it's not required anymore

changelog: none
2025-10-06 21:08:58 +00:00
Samuel Tardieu
2c71638be5
Implement volatile_composites lint (#15686)
Volatile reads and writes to non-primitive types are not well-defined,
and can cause problems.

Fixes rust-lang/rust-clippy#15529

changelog: [`volatile_composites`]: Lint when read/write_volatile is
used on composite types
(structs, arrays, etc) as their semantics are not well defined.
2025-10-06 21:06:29 +00:00
Alexey Semenyuk
f97b493fa5 Remove no-rustfix 2025-10-06 21:21:02 +03:00
dswij
4f21c9929c
extend while_let_loop to loop { let else } (#15701)
now lints on
```rs
let mut x = [1,2,3].into_iter();
loop {
   let Some(x) = x.next() else { break };
   dbg!(x);
}
```
```
changelog: [`while_let_loop`]: extend to lint on `let else`
```
2025-10-06 17:29:19 +00:00
Philipp Krones
2dc84cb744
Rustup (#15823)
r? @ghost

Late sync. Was at Oktoberfest on Thursday and then forgot to do it over
the long weekend in Germany.

changelog: none
2025-10-06 15:32:13 +00:00
Philipp Krones
085ddaaa97
Bump nightly version -> 2025-10-06 2025-10-06 17:26:17 +02:00
Philipp Krones
15727e0522
Merge remote-tracking branch 'upstream/master' into rustup 2025-10-06 17:26:03 +02:00
Alejandra González
23b1aceb9a
Fixed some lint deprecated versions in the documentation (#15822)
Some lints had a wrong deprecated version on the documentation (I didn't
check all of them, just recent ones).

Fixes rust-lang/rust-clippy#15811

changelog: [`match_on_vec_items`]: Fixed the deprecation version to
"1.88.0"
changelog: [`option_map_or_err_ok `]: Fixed the deprecation version to
"1.87.0"
changelog: [`string_to_string `]: Fixed the deprecation version to
"1.91.0"
2025-10-06 13:32:35 +00:00