Skip to content

Clippy subtree update #139983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 337 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
337 commits
Select commit Hold shift + click to select a range
de8c404
Fix type error in lint description
samueltardieu Mar 25, 2025
b7cbb4e
Add myself to reviewer rotation
samueltardieu Mar 25, 2025
ca48e46
Add myself to reviewer rotation (#14468)
samueltardieu Mar 25, 2025
d88818d
Rename `inconsistent_struct_constructor` configuration; don't suggest…
y21 Mar 25, 2025
f5d81a3
Fix type error in lint description (#14466)
blyxyas Mar 25, 2025
e78216c
suggest `is_some_and` instead of `map_or` in `case_sensitive_file_ext…
lapla-cogito Mar 6, 2025
1d89038
Move `uninlined_format_args` to `style`
nyurik Feb 6, 2025
d063e09
Move `uninlined_format_args` to `style`
nyurik Feb 15, 2025
8e50cfa
make tests consistent
nyurik Feb 16, 2025
9d78426
suggest `is_some_and` instead of `map_or` in `case_sensitive_file_ext…
samueltardieu Mar 25, 2025
1ca79a8
test fixes
nyurik Mar 25, 2025
d95bdcf
Rename `Sugg::maybe_par()` into `Sugg::maybe_paren()` (#14457)
blyxyas Mar 25, 2025
a001ae3
Move `uninlined_format_args` back to `style` (#14160)
Alexendoo Mar 25, 2025
aba76d0
Allow defining opaques in statics and consts
compiler-errors Mar 24, 2025
94233fb
Unify `manual_unwrap_or` and `manual_unwrap_or_default` code
samueltardieu Mar 1, 2025
1893e1e
Unify `manual_unwrap_or` and `manual_unwrap_or_default` code (#14332)
Manishearth Mar 25, 2025
6509de3
Fix situations identified by `collapsible_if` new hits
samueltardieu Feb 16, 2025
1da567b
Deprecate `match_on_vec_items` lint
samueltardieu Feb 14, 2025
d09e658
Apply collapsible if to Clippy sources (#14451)
flip1995 Mar 25, 2025
4517b42
Fix various typos in lint messages, descriptions and comments (#14459)
dswij Mar 26, 2025
939d5f9
fix: `option_if_let_else` suggests wrongly when coercion requires exp…
dswij Mar 26, 2025
a8bfafe
chore: fix some comments
todaymoon Mar 26, 2025
fe4dd5b
chore: fix some comments (#14475)
samueltardieu Mar 26, 2025
1b92712
expand: Leave traces when expanding `cfg` attributes
petrochenkov Mar 22, 2025
9b1945d
Prevent including preceeding whitespaces if line contains non blanks
samueltardieu Mar 26, 2025
c4789a0
Prevent including preceeding whitespaces if line contains non blanks …
Manishearth Mar 26, 2025
3e52867
more natural suggestions for `cmp_owned` (#14247)
Centri3 Mar 27, 2025
764c1b6
remove obsolete "Known Problems" in `ok_expect` (#14458)
dswij Mar 27, 2025
d9913dd
Do not warn about shadowing in a destructuring assigment
samueltardieu Mar 9, 2025
a895265
Do not warn about shadowing in a destructuring assigment (#14381)
samueltardieu Mar 27, 2025
9df5177
Convert the `collapsible_if` early lint to a late one
samueltardieu Mar 26, 2025
cd70152
Make `collapsible_if` recognize the `let_chains` feature
samueltardieu Mar 26, 2025
79c6911
Apply `collapsible_if` to Clippy itself
samueltardieu Mar 26, 2025
01820a9
Do not make incomplete or invalid suggestions
samueltardieu Mar 27, 2025
61b38e7
Do not make incomplete or invalid suggestions (#14487)
Manishearth Mar 27, 2025
32f3301
Add `{ast,hir,thir}::PatKind::Missing` variants.
nnethercote Mar 26, 2025
c2922d1
Make `collapsible_if` recognize the `let_chains` feature (#14481)
flip1995 Mar 28, 2025
a1e1960
Move `desugar_await` to `clippy_utils`
samueltardieu Mar 20, 2025
3e960c1
Make missing_const_for_fn operate on non-optimized MIR
1c3t3a Jan 15, 2025
d78622e
Make missing_const_for_fn operate on non-optimized MIR (#14003)
blyxyas Mar 28, 2025
8357d06
Factor out `clippy_utils::get_async_closure_expr()`
samueltardieu Mar 20, 2025
4ac3611
`implicit_return`: do not suggest adding `return` into desugared code
samueltardieu Mar 20, 2025
ecb421f
Rollup merge of #139065 - RalfJung:miri-sync, r=RalfJung
matthiaskrgr Mar 28, 2025
432a8a7
Properly handle expansion in `single_match`
samueltardieu Mar 28, 2025
bc70192
Take advantage of match ergonomics in `clippy_utils::hir_utils`
samueltardieu Mar 29, 2025
bc28421
Take advantage of match ergonomics in `clippy_utils::hir_utils` (#14499)
dswij Mar 29, 2025
2df6bba
fix: `unnested_or_patterns` suggests wrongly in `let`
profetia Mar 13, 2025
4c610e3
fix: `unnested_or_patterns` suggests wrongly in `let` (#14401)
y21 Mar 29, 2025
ffaecd0
manually fulfill lint expectations for all unsafe blocks with metavars
y21 Mar 29, 2025
8f3a0db
don't hardcode repository owner in changelog CI
y21 Mar 29, 2025
fb32aaf
new lint: `chars_enumerate_for_byte_indices`
y21 Sep 21, 2024
32cf884
add a note for `str::bytes`
y21 Dec 3, 2024
d5d2189
rename lint to `char_indices_as_byte_indices`
y21 Dec 3, 2024
c739027
add comment and `.clone()` test case
y21 Mar 30, 2025
2eee361
use `is_automatically_derived()` instead of `has_attr(sym::automatica…
WeiTheShinobi Mar 30, 2025
cd67b3b
Don't hardcode repository in changelog CI (#14500)
flip1995 Mar 30, 2025
4f58673
new lint: `char_indices_as_byte_indices` (#13435)
Centri3 Mar 30, 2025
5f26d0e
Drop `clippy::invalid_null_ptr_usage`
Urgau Mar 9, 2025
eee7c58
use `is_automatically_derived()` instead of `has_attr()` (#14506)
Jarcho Mar 31, 2025
5791b9c
Auto merge of #119220 - Urgau:uplift-invalid_null_ptr_usage, r=fee1-dead
bors Mar 31, 2025
b46b311
add `manual_dangling_ptr` lint (#14107)
Jarcho Mar 31, 2025
bb0d09b
Make `visit_map` happy path more evident (#14376)
Jarcho Mar 31, 2025
9172556
Suggest `./x test src/tools/clippy --bless` when in `rust-lang/rust`
Alexendoo Mar 31, 2025
ce39784
Move `FindPanicUnwrap` to `missing_headers.rs`
Alexendoo Mar 14, 2025
c893685
Fix partially const bodies not linting `missing_panics_doc`
Alexendoo Mar 14, 2025
6ee4f34
Abide by `allow`/`expect` in bodies for `missing_panics_doc`
Alexendoo Mar 14, 2025
f894a81
Fulfill expectations after first `missing-panics-doc`
Alexendoo Mar 22, 2025
b96fecf
Allow `#[expect]` and `#[allow]` within function bodies for `missing_…
Jarcho Mar 31, 2025
3e837ec
Enable triagebot's merge conflict notifications
Alexendoo Mar 31, 2025
1e78abc
expand `obfuscated_if_else` to support `{then(), then_some()}.unwrap_…
Manishearth Mar 31, 2025
7d3d824
Properly handle expansion in `single_match` (#14495)
Manishearth Mar 31, 2025
9e6c7af
Suggest `./x test src/tools/clippy --bless` when in `rust-lang/rust` …
flip1995 Mar 31, 2025
6366e31
Enable triagebot's merge conflict notifications (#14508)
flip1995 Mar 31, 2025
a50fb22
Avoid `kw::Empty` use for `AuxParamsAttr`.
nnethercote Mar 27, 2025
d28d234
correct version attribute for `io_other_error` (#14282)
samueltardieu Mar 31, 2025
5101c8e
Move `ast::Item::ident` into `ast::ItemKind`.
nnethercote Mar 20, 2025
3f752b4
Address review comments.
nnethercote Apr 1, 2025
93d0885
Auto merge of #138740 - nnethercote:ast-ItemKind-idents, r=fmease
bors Apr 1, 2025
86e6cb5
Decouple trait impls of different traits wrt incremental
oli-obk Mar 27, 2025
88c46ea
Install cmake to restore lintcheck run
samueltardieu Apr 1, 2025
4304fa2
Auto merge of #138492 - lcnr:rm-inline_const_pat, r=oli-obk
bors Apr 1, 2025
54994b2
Fix the primary span of redundant_pub_crate when flagging nameless items
fmease Apr 1, 2025
227e43a
Install cmake to restore lintcheck runs (#14514)
Alexendoo Apr 1, 2025
6ca6b09
Fix the primary span of `redundant_pub_crate` when flagging nameless …
Manishearth Apr 1, 2025
d81396b
Do not build `tokio-rustls` in the CI for the time being
samueltardieu Apr 1, 2025
46878e3
Do not build `tokio-rustls` in the CI for the time being (#14517)
Alexendoo Apr 1, 2025
e429bde
Manually fulfill lint expectations for all unsafe blocks with metavar…
blyxyas Apr 1, 2025
dc7d9ec
Validate paths in `disallowed_*` configurations
smoelius Mar 12, 2025
e975563
Validate paths in `disallowed_*` configurations (#14397)
samueltardieu Apr 1, 2025
130af3f
Move methods from `Map` to `TyCtxt`, part 5.
nnethercote Apr 1, 2025
777c7cd
Remove a function that has no necessary callers
oli-obk Apr 1, 2025
2e181e7
Auto merge of #139018 - oli-obk:incremental-trait-impls, r=compiler-e…
bors Apr 2, 2025
2d119ce
Stop relabelling PRs with merge conflicts
Alexendoo Apr 2, 2025
978ed96
Rollup merge of #139232 - nnethercote:remove-Map-5, r=Zalathar
TaKO8Ki Apr 2, 2025
0ca62d1
Stop relabelling PRs with merge conflicts (#14521)
flip1995 Apr 2, 2025
52a3082
add `manual_abs_diff` lint
yotamofek Mar 26, 2025
1f4abb4
Use `BinOpKind` instead of `BinOp` for function args where possible.
nnethercote Dec 19, 2024
eaaf3ab
Tighten up assignment operator representations.
nnethercote Dec 19, 2024
db4bd96
Ensure that peeling does not recurse into macros
samueltardieu Apr 2, 2025
416acd8
Don't use `f16` and `f128` directly in `clippy_utils`
beetrees Apr 2, 2025
6f0f22c
Fix a typo in derive.rs comment
smoelius Apr 3, 2025
f9a1a1f
Fix a typo in derive.rs comment (#14529)
samueltardieu Apr 3, 2025
b60a516
Make LevelAndSource a struct
oli-obk Mar 19, 2025
9451626
Remove `LintExpectationId` from `Level` variants
oli-obk Mar 19, 2025
ea97148
impl !PartialOrd for HirId
oli-obk Mar 17, 2025
193e9f2
Don't use `f16` and `f128` directly in `clippy_utils` (#14528)
Jarcho Apr 3, 2025
893a6a3
Update to new rinja version (askama)
GuillaumeGomez Apr 3, 2025
41d7e45
Update to new rinja version (askama) (#14530)
flip1995 Apr 3, 2025
39c98c7
Rollup merge of #138610 - oli-obk:no-sort-hir-ids, r=compiler-errors
matthiaskrgr Apr 3, 2025
ab7e525
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Apr 3, 2025
c44191a
Bump nightly version -> 2025-04-03
flip1995 Apr 3, 2025
c97bd74
Bump Clippy version -> 0.1.88
flip1995 Apr 3, 2025
944dfc7
Changelog for Clippy 1.86
flip1995 Apr 3, 2025
a2251a8
Changelog for Clippy 1.86 :penguin: (#14538)
y21 Apr 3, 2025
7bb54d9
Rustup (#14539)
flip1995 Apr 3, 2025
a23e8d3
Update versions of 1.86 lints
flip1995 Apr 3, 2025
a5a033d
Update versions of 1.86 lints (#14540)
y21 Apr 3, 2025
fb8e574
Consider nested lifetimes in `mut_from_ref`
arnaudgolfouse Mar 25, 2025
315ea95
Do not propose to auto-derive `Clone` in presence of unsafe fields
samueltardieu Apr 6, 2025
cf9cffa
Fixes for `missing_asserts_for_indexing` (#14108)
samueltardieu Apr 6, 2025
d1c315a
`missing_asserts_for_indexing`: consider `assert_eq!()` as well
samueltardieu Feb 20, 2025
76d5a26
Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk
Zalathar Apr 7, 2025
8b9165c
Enable canonicalization of issue links in triagebot.toml
Urgau Apr 7, 2025
f74d7ce
Enable canonicalization of issue links in triagebot (#14563)
blyxyas Apr 7, 2025
f5122ae
Add doc for the `clippy_lints::methods::derefs_to_slice()` helper
samueltardieu Apr 8, 2025
ee36124
fix: `iter_cloned_collect` FP with custom `From`/`IntoIterator` impl
profetia Mar 25, 2025
634c1c8
Ensure that peeling does not recurse into macros (#14527)
Alexendoo Apr 8, 2025
1a1ad5e
fix: `iter_cloned_collect` FP with custom `From`/`IntoIterator` impl …
samueltardieu Apr 8, 2025
97bb063
Add doc for the `clippy_lints::methods::derefs_to_slice()` helper (#1…
blyxyas Apr 8, 2025
bd2cb6a
Do not repeat identical code
samueltardieu Mar 24, 2025
89385c1
Insert parentheses as required
samueltardieu Mar 24, 2025
eed88e4
Enable GitHub review synchronization with S-waiting-on-* labels
samueltardieu Apr 8, 2025
189b076
fix: map_entry: don't emit lint before checks have been performed
meithecatte Apr 9, 2025
a7280e0
Use explicit `return` instead of empty block to bail out from lint
samueltardieu Apr 9, 2025
0fe3317
Accept `self.cmp(other).into()` as canonical `PartialOrd` impl
samueltardieu Apr 9, 2025
e463309
add `manual_abs_diff` lint (#14482)
samueltardieu Apr 9, 2025
1cfc95c
fix: map_entry: don't emit lint before checks have been performed (#1…
Alexendoo Apr 9, 2025
630ac0c
Accept `self.cmp(other).into()` as canonical `PartialOrd` impl (#14573)
Manishearth Apr 9, 2025
e0e2a93
Enable GitHub review synchronization with S-waiting-on-* labels (#14567)
flip1995 Apr 9, 2025
723f5b1
Enable no mentions in commits of triagebot
Urgau Apr 9, 2025
328b4fa
Rename some `name` variables as `ident`.
nnethercote Apr 8, 2025
85bf0b2
dogfood: run with `-D clippy::dbg_macro`
samueltardieu Apr 10, 2025
0aa0d07
Remove brackets around type name when it is no longer a prefix
samueltardieu Mar 6, 2025
529bb5f
Correctly handle bracketed type in `default_constructed_unit_struct` …
samueltardieu Apr 10, 2025
822b931
Avoid a `kw::Empty` usage.
nnethercote Apr 10, 2025
3690f3b
Avoid an `Ident::empty` usage.
nnethercote Apr 10, 2025
94ec239
Allow drivers to supply a list of extra symbols to intern
Alexendoo Mar 19, 2025
15fd2ab
Fix a help message of `empty_line_after_doc_comments` for cases where…
fmease Apr 10, 2025
0286d46
Fix a help message of `empty_line_after_doc_comments` for cases where…
samueltardieu Apr 10, 2025
042a54c
Build complete usable type from a type-relative prefix
samueltardieu Apr 10, 2025
65105f1
Rollup merge of #138682 - Alexendoo:extra-symbols, r=fee1-dead
Zalathar Apr 11, 2025
0cd5b62
Avoid some uses of empty identifiers (#14580)
samueltardieu Apr 11, 2025
c7fbcf4
Test for Multiple return statements doesnt decrease cognitive complexity
cerdelen Apr 11, 2025
fa5e855
Assign PR touching `triagebot.toml` to Philipp
samueltardieu Apr 11, 2025
2c021ca
Reinstate checking of `tokio-rustls` in lintcheck
samueltardieu Apr 11, 2025
e1bd4e4
arbitrary_source_item_ordering should ignore test modules
alex-semenyuk Apr 10, 2025
c67df05
`arbitrary_source_item_ordering` should ignore test modules (#14585)
samueltardieu Apr 11, 2025
8418338
Enable no mentions in commits of triagebot (#14576)
flip1995 Apr 11, 2025
7e60c1f
Assign PR touching `triagebot.toml` to Philipp (#14590)
flip1995 Apr 11, 2025
595c8f9
Introduce `DefPathData::AnonAssocTy`.
nnethercote Apr 11, 2025
dd21b6e
book: indicate that at least one error marker is required
samueltardieu Apr 11, 2025
fad1bfc
Reinstate checking of `tokio-rustls` in lintcheck (#14591)
Alexendoo Apr 11, 2025
ac4c69f
`implicit_return`: better handling of asynchronous code (#14446)
Alexendoo Apr 11, 2025
07d8a9d
fix: `redundant_clone` FP in overlapping lifetime
profetia Apr 11, 2025
ec105ba
fix: `redundant_clone` FP in overlapping lifetime (#14237)
samueltardieu Apr 11, 2025
9849319
Rollup merge of #139662 - nnethercote:tweak-DefPathData, r=compiler-e…
jhpratt Apr 11, 2025
ebd5962
`iter_kv_map`: recognize references on maps as well
samueltardieu Apr 11, 2025
4b140cb
Remove some `clippy::all` uses from UI tests
Alexendoo Apr 12, 2025
3dd1a9b
dogfood: run with `-D clippy::dbg_macro` (#14579)
y21 Apr 12, 2025
3f6025a
book: indicate that at least one error marker is required (#14589)
y21 Apr 12, 2025
8dfcaa0
Do not propose to auto-derive `Clone` in presence of unsafe fields (#…
y21 Apr 12, 2025
b157411
Consecutive returns dont decrease cognitive Complexity level anymore …
y21 Apr 12, 2025
5b4b463
Move internal lints to their own crate
Jarcho Aug 5, 2024
d19c651
Remove some `clippy::all` uses from UI tests (#14600)
Jarcho Apr 12, 2025
5aa44a8
store the kind of pattern adjustments in `pat_adjustments`
dianne Mar 15, 2025
aa2f48b
Change Test for Issue 14422 (Cognitive Complexity lowered through mul…
cerdelen Apr 13, 2025
dbc0755
Change Test for Issue 14422 (Cognitive Complexity lowered through mul…
Alexendoo Apr 13, 2025
b90c80a
Deprecate `match_on_vec_items` lint (#14217)
samueltardieu Apr 13, 2025
327da45
Fulfill the lint expectation even if allowed at the type level
samueltardieu Apr 13, 2025
69ade77
Fulfill the lint expectation even if allowed at the type level (#14604)
Alexendoo Apr 13, 2025
e6dc2e9
Use `Symbol` in `LateContext::get_associated_type`.
nnethercote Apr 11, 2025
d891f77
Move `has_self` field to `hir::AssocKind::Fn`.
nnethercote Apr 10, 2025
77b3ac3
Check for lifetime uses in closures as well
samueltardieu Apr 14, 2025
1cab0b4
Do not lint result from macro expansion
samueltardieu Mar 24, 2025
4d343d5
Check MSRV before suggesting fix in `const` context
samueltardieu Mar 24, 2025
c43c87d
Recognize `<uint>::count_ones(x)` as `x.count_ones()`
samueltardieu Apr 14, 2025
67dc0d0
Move `opt_rpitit_info` field to `hir::AssocKind::Type`.
nnethercote Apr 11, 2025
4784074
Move `name` field from `AssocItem` to `AssocKind` variants.
nnethercote Apr 14, 2025
02764f6
Various fixes for `manual_is_power_of_two` (#14463)
blyxyas Apr 14, 2025
d3267e9
Consider nested lifetimes in `mut_from_ref` (#14471)
blyxyas Apr 14, 2025
e2422a6
new lint: `redundant_test_prefix`
farazdagi Nov 12, 2024
e0c8b4b
Replace stray `println!()` in lint code by `bug!()`
samueltardieu Apr 15, 2025
459897b
`missing_asserts_for_indexing`: consider `assert_eq!()` as well (#14258)
Manishearth Apr 15, 2025
b3d401e
Add unsafe markers to accomodate edition 2024 rules
samueltardieu Apr 13, 2025
67d5056
Add `blocks_in_conditions` edition 2021 specific tests
samueltardieu Apr 13, 2025
4435474
Use reference patterns compatible with edition 2024
samueltardieu Apr 13, 2025
20649a8
Add `use<>` markers for edition 2024 compatibility
samueltardieu Apr 13, 2025
cd26de6
`misnamed_getters`: support `unsafe` blocks around getters
samueltardieu Apr 13, 2025
62a9cad
Add `needless_pass_by_ref_mut` edition 2021 specific test
samueltardieu Apr 13, 2025
ecd2025
Add `search_is_some_fixable_*` edition 2021 specific tests
samueltardieu Apr 13, 2025
c7640e0
Run UI tests with edition 2024 by default
samueltardieu Apr 13, 2025
9663da3
Run UI tests in edition 2024 mode (#14602)
samueltardieu Apr 15, 2025
0ef2e75
Add `note` feature to triagebot's config
samueltardieu Apr 15, 2025
5dc239a
`ptr_cast_constness`: show snippet from the right context
samueltardieu Apr 15, 2025
4d47d7f
Rename `LifetimeName` as `LifetimeKind`.
nnethercote Mar 27, 2025
08c78e0
Replace stray `println!()` in lint code by `bug!()` (#14618)
blyxyas Apr 16, 2025
8eed350
New lint: `redundant_test_prefix` (#13710)
samueltardieu Apr 16, 2025
0bfcd0d
`bool_to_int_with_if`: properly handle macros
samueltardieu Apr 16, 2025
10a8327
`match_single_binding`: allow macros in scrutinee and patterns
samueltardieu Apr 16, 2025
6c4c3a5
samueltardieu: vacation for ~3 weeks
samueltardieu Apr 16, 2025
91658a7
samueltardieu: vacation for ~3 weeks (#14636)
samueltardieu Apr 16, 2025
097c9c7
Replace infallible `name_or_empty` methods with fallible `name` methods.
nnethercote Apr 10, 2025
222660b
Build complete usable type from a type-relative prefix (#14586)
blyxyas Apr 17, 2025
949b3bc
`bool_to_int_with_if`: properly handle macros (#14629)
Manishearth Apr 17, 2025
3479fdf
Add `note` feature to triagebot's config (#14620)
flip1995 Apr 17, 2025
cc6a3d8
Do not recurse forever in `significant_drop_tightening`
samueltardieu Apr 17, 2025
30e9cd5
Do not recurse forever in `significant_drop_tightening` (#14641)
y21 Apr 17, 2025
05448bd
New lint: `swap_with_temporary`
samueltardieu Jan 20, 2025
ac88357
New lint: `swap_with_temporary` (#14046)
y21 Apr 17, 2025
5a1dbea
fix: `unnecessary_lazy_evaluations` suggests wrongly for async closure
profetia Apr 17, 2025
a49ea2d
fix: `unnecessary_lazy_evaluations` suggests wrongly for async closur…
samueltardieu Apr 17, 2025
26f43ff
`match_single_binding`: allow macros in scrutinee and patterns (#14635)
Jarcho Apr 17, 2025
94f0994
Check for lifetime uses in closures as well (#14608)
dswij Apr 17, 2025
fa9254f
Do not lint reachable enums and enum variants used as functions in th…
ARandomDev99 Apr 17, 2025
de90fa4
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Apr 17, 2025
8a0b225
Bump nightly version -> 2025-04-17
flip1995 Apr 17, 2025
e294f94
Rustup (#14647)
flip1995 Apr 17, 2025
66dd172
Rollup merge of #138528 - dianne:implicit-deref-patterns, r=Nadrieril
matthiaskrgr Apr 18, 2025
ed892e7
Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann
matthiaskrgr Apr 18, 2025
bcd76c3
`empty_enum_variants_with_brackets`: Do not lint reachable enums and …
y21 Apr 18, 2025
781fdab
Move internal lints to their own crate (#13223)
y21 Apr 18, 2025
b52bd96
Replace interning of string literals with preinterned symbols
Alexendoo Apr 18, 2025
86a10f0
fix: `double_ended_iterator_last` FP when iter has side effects
profetia Mar 28, 2025
c6d76bb
fix: `needless_collect` does not consider side effects
profetia Mar 28, 2025
077475f
`ptr_cast_constness`: show snippet from the right context (#14622)
Alexendoo Apr 20, 2025
8843067
manual_ok_err: don't lint subpatterns
Alexendoo Apr 20, 2025
48430c2
`iter_kv_map`: recognize references on maps as well (#14596)
blyxyas Apr 21, 2025
f829f8c
Make `borrow_as_ptr` flag implicit casts as well (#14408)
dswij Apr 21, 2025
cc00c77
Replace interning of string literals with preinterned symbols (#14650)
y21 Apr 21, 2025
083ea7e
`manual_ok_err`: don't lint subpatterns (#14661)
y21 Apr 21, 2025
7a4d523
Fix question_mark suggesting when type is behind Deref include parent…
alex-semenyuk Apr 20, 2025
aeb6ac9
Fix question_mark suggesting when type is behind Deref include parent…
Jarcho Apr 22, 2025
a50e043
Expand mutable capture check for `is_iter_with_side_effects()`
profetia Apr 1, 2025
c3fb102
Consider side effects when rewriting iterator behaviors (#14490)
Jarcho Apr 22, 2025
ac477db
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Apr 22, 2025
bdc4327
Bump nightly version -> 2025-04-22
flip1995 Apr 22, 2025
0621446
Rustup (#14667)
flip1995 Apr 22, 2025
1386654
Merge commit '0621446356e20fd2ead13a6763bb936c95eb0cfa' into clippy-s…
flip1995 Apr 22, 2025
672dd11
Update Cargo.lock
flip1995 Apr 22, 2025
9510982
tidy: Remove rinja deps from proc_macro_deps
flip1995 Apr 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 22 additions & 63 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,14 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"

[[package]]
name = "clippy"
version = "0.1.87"
version = "0.1.88"
dependencies = [
"anstream",
"askama",
"cargo_metadata 0.18.1",
"clippy_config",
"clippy_lints",
"clippy_lints_internal",
"clippy_utils",
"color-print",
"filetime",
Expand All @@ -562,7 +564,6 @@ dependencies = [
"pulldown-cmark 0.11.3",
"quote",
"regex",
"rinja",
"rustc_tools_util 0.4.2",
"serde",
"serde_json",
Expand All @@ -577,7 +578,7 @@ dependencies = [

[[package]]
name = "clippy_config"
version = "0.1.87"
version = "0.1.88"
dependencies = [
"clippy_utils",
"itertools",
Expand All @@ -602,30 +603,37 @@ dependencies = [

[[package]]
name = "clippy_lints"
version = "0.1.87"
version = "0.1.88"
dependencies = [
"arrayvec",
"cargo_metadata 0.18.1",
"clippy_config",
"clippy_utils",
"itertools",
"quine-mc_cluskey",
"regex",
"regex-syntax 0.8.5",
"semver",
"serde",
"serde_json",
"tempfile",
"toml 0.7.8",
"unicode-normalization",
"unicode-script",
"url",
"walkdir",
]

[[package]]
name = "clippy_lints_internal"
version = "0.0.1"
dependencies = [
"clippy_config",
"clippy_utils",
"regex",
"rustc-semver",
]

[[package]]
name = "clippy_utils"
version = "0.1.87"
version = "0.1.88"
dependencies = [
"arrayvec",
"itertools",
Expand Down Expand Up @@ -2244,22 +2252,6 @@ dependencies = [
"libc",
]

[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"

[[package]]
name = "mime_guess"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
dependencies = [
"mime",
"unicase",
]

[[package]]
name = "minifier"
version = "0.3.5"
Expand Down Expand Up @@ -3084,45 +3076,6 @@ dependencies = [
"walkdir",
]

[[package]]
name = "rinja"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dc4940d00595430b3d7d5a01f6222b5e5b51395d1120bdb28d854bb8abb17a5"
dependencies = [
"itoa",
"rinja_derive",
]

[[package]]
name = "rinja_derive"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d9ed0146aef6e2825f1b1515f074510549efba38d71f4554eec32eb36ba18b"
dependencies = [
"basic-toml",
"memchr",
"mime",
"mime_guess",
"proc-macro2",
"quote",
"rinja_parser",
"rustc-hash 2.1.1",
"serde",
"syn 2.0.100",
]

[[package]]
name = "rinja_parser"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93f9a866e2e00a7a1fb27e46e9e324a6f7c0e7edc4543cae1d38f4e4a100c610"
dependencies = [
"memchr",
"nom",
"serde",
]

[[package]]
name = "run_make_support"
version = "0.2.0"
Expand Down Expand Up @@ -3196,6 +3149,12 @@ dependencies = [
"crossbeam-utils",
]

[[package]]
name = "rustc-semver"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"

[[package]]
name = "rustc-stable-hash"
version = "0.1.2"
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/src/utils/proc_macro_deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ pub static CRATES: &[&str] = &[
"libc",
"log",
"memchr",
"mime",
"mime_guess",
"minimal-lexical",
"nom",
"once_cell",
Expand All @@ -38,7 +36,6 @@ pub static CRATES: &[&str] = &[
"pest_meta",
"proc-macro2",
"quote",
"rinja_parser",
"rustc-hash",
"self_cell",
"serde",
Expand All @@ -56,7 +53,6 @@ pub static CRATES: &[&str] = &[
"unic-langid",
"unic-langid-impl",
"unic-langid-macros",
"unicase",
"unicode-ident",
"unicode-width",
"version_check",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Check Changelog
if: ${{ github.event_name == 'pull_request' }}
run: |
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | \
python -c "import sys, json; print(json.load(sys.stdin)['body'])")
output=$(awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g")
if [ -z "$output" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_mq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: cargo test --features internal -- --skip dogfood

- name: Test clippy_lints
run: cargo test --features internal
run: cargo test
working-directory: clippy_lints

- name: Test clippy_utils
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: cargo test --features internal

- name: Test clippy_lints
run: cargo test --features internal
run: cargo test
working-directory: clippy_lints

- name: Test clippy_utils
Expand Down
4 changes: 4 additions & 0 deletions src/tools/clippy/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
tags:
- rust-1.**

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

env:
TARGET_BRANCH: 'gh-pages'
SHA: '${{ github.sha }}'
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/.github/workflows/lintcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Run lintcheck
if: steps.cache-json.outputs.cache-hit != 'true'
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
run: env CLIPPY_CONF_DIR="$PWD/lintcheck/ci-config" ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml

- name: Upload base JSON
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: cargo build --manifest-path=lintcheck/Cargo.toml

- name: Run lintcheck
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
run: env CLIPPY_CONF_DIR="$PWD/lintcheck/ci-config" ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml

- name: Upload head JSON
uses: actions/upload-artifact@v4
Expand Down
70 changes: 67 additions & 3 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,68 @@ document.

## Unreleased / Beta / In Rust Nightly

[609cd310...master](https://github.com/rust-lang/rust-clippy/compare/609cd310...master)
[3e3715c3...master](https://github.com/rust-lang/rust-clippy/compare/3e3715c3...master)

## Rust 1.86

Current stable, released 2025-04-03

[View all 108 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-12-27T15%3A11%3A38Z..2025-02-06T13%3A57%3A58Z+base%3Amaster)

### New Lints

* Added [`unneeded_struct_pattern`] to `style` [#13465](https://github.com/rust-lang/rust-clippy/pull/13465)
* Added [`doc_overindented_list_items`] to `style` [#13711](https://github.com/rust-lang/rust-clippy/pull/13711)
* Added [`manual_ok_err`] to `complexity` [#13740](https://github.com/rust-lang/rust-clippy/pull/13740)
* Added [`non_std_lazy_statics`] to `pedantic` [#13770](https://github.com/rust-lang/rust-clippy/pull/13770)
* Added [`manual_repeat_n`] to `style` [#13858](https://github.com/rust-lang/rust-clippy/pull/13858)
* Added [`manual_option_as_slice`] to `complexity` [#13901](https://github.com/rust-lang/rust-clippy/pull/13901)
* Added [`double_ended_iterator_last`] to `perf` [#13922](https://github.com/rust-lang/rust-clippy/pull/13922)
* Added [`useless_nonzero_new_unchecked`] to `complexity` [#13993](https://github.com/rust-lang/rust-clippy/pull/13993)
* Added [`sliced_string_as_bytes`] to `perf` [#14002](https://github.com/rust-lang/rust-clippy/pull/14002)
* Added [`unnecessary_semicolon`] to `pedantic` [#14032](https://github.com/rust-lang/rust-clippy/pull/14032)
* Added [`return_and_then`] to `restriction` [#14051](https://github.com/rust-lang/rust-clippy/pull/14051)
* Added [`manual_slice_fill`] to `style` [#14082](https://github.com/rust-lang/rust-clippy/pull/14082)
* Added [`precedence_bits`] to `restriction` [#14115](https://github.com/rust-lang/rust-clippy/pull/14115)

### Moves and Deprecations

* Moved [`redundant_locals`] to `suspicious` (from `correctness`, now warn-by-default)
[#13747](https://github.com/rust-lang/rust-clippy/pull/13747)
* Moved [`format_push_string`] to `pedantic` (from `restriction`)
[#13894](https://github.com/rust-lang/rust-clippy/pull/13894)
* Moved [`format_collect`] to `pedantic` (from `perf`, now allow-by-default)
[#13894](https://github.com/rust-lang/rust-clippy/pull/13894)
* Moved [`mutex_integer`] to `restriction` (from `nursery`) [#14110](https://github.com/rust-lang/rust-clippy/pull/14110)

### Enhancements

* Add `lint-inconsistent-struct-field-initializers` configuration option to [`inconsistent_struct_constructor`]
[#13737](https://github.com/rust-lang/rust-clippy/pull/13737)
* [`len_zero`] now also triggers if deref target implements `is_empty()`
[#13871](https://github.com/rust-lang/rust-clippy/pull/13871)
* [`obfuscated_if_else`] now also triggers for the `.then(..).unwrap_or(..)` pattern
[#14021](https://github.com/rust-lang/rust-clippy/pull/14021)

### False Positive Fixes

* [`trailing_empty_array`] no longer triggers in tests [#13844](https://github.com/rust-lang/rust-clippy/pull/13844)
* [`missing_const_for_fn`] no longer triggers in tests [#13945](https://github.com/rust-lang/rust-clippy/pull/13945)
* [`significant_drop_in_scrutinee`]: do not falsely warn for temporaries created by `.await` expansion
[#13985](https://github.com/rust-lang/rust-clippy/pull/13985)

### ICE Fixes

* [`borrow_interior_mutable_const`] Fix an ICE that can occur when taking a reference to a tuple/`struct` field of an
interior mutable `const` [#13877](https://github.com/rust-lang/rust-clippy/pull/13877)

### Others

* Clippy now uses Rust edition 2024 [#13751](https://github.com/rust-lang/rust-clippy/pull/13751)

## Rust 1.85

Current stable, released 2025-02-20
Released 2025-02-20

[View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2024-11-15T19%3A31%3A08Z..2024-12-26T13%3A59%3A48Z+base%3Amaster)

Expand Down Expand Up @@ -5516,6 +5573,7 @@ Released 2018-09-13
[`cast_slice_different_sizes`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_different_sizes
[`cast_slice_from_raw_parts`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts
[`cfg_not_test`]: https://rust-lang.github.io/rust-clippy/master/index.html#cfg_not_test
[`char_indices_as_byte_indices`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_indices_as_byte_indices
[`char_lit_as_u8`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
[`chars_last_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp
[`chars_next_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp
Expand Down Expand Up @@ -5681,6 +5739,7 @@ Released 2018-09-13
[`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
[`if_then_some_else_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
[`ignore_without_reason`]: https://rust-lang.github.io/rust-clippy/master/index.html#ignore_without_reason
[`ignored_unit_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
[`impl_hash_borrow_with_str_and_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_hash_borrow_with_str_and_bytes
[`impl_trait_in_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_trait_in_params
Expand Down Expand Up @@ -5783,12 +5842,14 @@ Released 2018-09-13
[`macro_metavars_in_unsafe`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_metavars_in_unsafe
[`macro_use_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_use_imports
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
[`manual_abs_diff`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff
[`manual_assert`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
[`manual_c_str_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals
[`manual_clamp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
[`manual_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
[`manual_dangling_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_dangling_ptr
[`manual_div_ceil`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
[`manual_filter`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
Expand Down Expand Up @@ -6055,6 +6116,7 @@ Released 2018-09-13
[`redundant_pub_crate`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
[`redundant_slicing`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing
[`redundant_static_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
[`redundant_test_prefix`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_test_prefix
[`redundant_type_annotations`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_type_annotations
[`ref_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
[`ref_binding_to_reference`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_binding_to_reference
Expand Down Expand Up @@ -6156,6 +6218,7 @@ Released 2018-09-13
[`suspicious_unary_op_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_unary_op_formatting
[`suspicious_xor_used_as_pow`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_xor_used_as_pow
[`swap_ptr_to_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#swap_ptr_to_ref
[`swap_with_temporary`]: https://rust-lang.github.io/rust-clippy/master/index.html#swap_with_temporary
[`tabs_in_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
[`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment
[`temporary_cstring_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr
Expand Down Expand Up @@ -6346,6 +6409,7 @@ Released 2018-09-13
[`await-holding-invalid-types`]: https://doc.rust-lang.org/clippy/lint_configuration.html#await-holding-invalid-types
[`cargo-ignore-publish`]: https://doc.rust-lang.org/clippy/lint_configuration.html#cargo-ignore-publish
[`check-incompatible-msrv-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-incompatible-msrv-in-tests
[`check-inconsistent-struct-field-initializers`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-inconsistent-struct-field-initializers
[`check-private-items`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-private-items
[`cognitive-complexity-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#cognitive-complexity-threshold
[`disallowed-macros`]: https://doc.rust-lang.org/clippy/lint_configuration.html#disallowed-macros
Expand All @@ -6362,7 +6426,7 @@ Released 2018-09-13
[`future-size-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#future-size-threshold
[`ignore-interior-mutability`]: https://doc.rust-lang.org/clippy/lint_configuration.html#ignore-interior-mutability
[`large-error-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#large-error-threshold
[`lint-inconsistent-struct-field-initializers`]: https://doc.rust-lang.org/clippy/lint_configuration.html#lint-inconsistent-struct-field-initializers
[`lint-commented-code`]: https://doc.rust-lang.org/clippy/lint_configuration.html#lint-commented-code
[`literal-representation-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#literal-representation-threshold
[`matches-for-let-else`]: https://doc.rust-lang.org/clippy/lint_configuration.html#matches-for-let-else
[`max-fn-params-bools`]: https://doc.rust-lang.org/clippy/lint_configuration.html#max-fn-params-bools
Expand Down
Loading
Loading