Skip to content

Commit df35ff6

Browse files
committed
Auto merge of #139983 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update r? `@Manishearth` Cargo.lock update due to the Clippy version bump and because Clippy moved from rinja (unmaintained) to askama. Last sync was skipped due to the askama issue and me not getting to fixing this in time.
2 parents 553600e + e8737e3 commit df35ff6

File tree

748 files changed

+13740
-7047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

748 files changed

+13740
-7047
lines changed

Cargo.lock

+22-63
Original file line numberDiff line numberDiff line change
@@ -546,12 +546,14 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
546546

547547
[[package]]
548548
name = "clippy"
549-
version = "0.1.87"
549+
version = "0.1.88"
550550
dependencies = [
551551
"anstream",
552+
"askama",
552553
"cargo_metadata 0.18.1",
553554
"clippy_config",
554555
"clippy_lints",
556+
"clippy_lints_internal",
555557
"clippy_utils",
556558
"color-print",
557559
"filetime",
@@ -562,7 +564,6 @@ dependencies = [
562564
"pulldown-cmark 0.11.3",
563565
"quote",
564566
"regex",
565-
"rinja",
566567
"rustc_tools_util 0.4.2",
567568
"serde",
568569
"serde_json",
@@ -577,7 +578,7 @@ dependencies = [
577578

578579
[[package]]
579580
name = "clippy_config"
580-
version = "0.1.87"
581+
version = "0.1.88"
581582
dependencies = [
582583
"clippy_utils",
583584
"itertools",
@@ -602,30 +603,37 @@ dependencies = [
602603

603604
[[package]]
604605
name = "clippy_lints"
605-
version = "0.1.87"
606+
version = "0.1.88"
606607
dependencies = [
607608
"arrayvec",
608609
"cargo_metadata 0.18.1",
609610
"clippy_config",
610611
"clippy_utils",
611612
"itertools",
612613
"quine-mc_cluskey",
613-
"regex",
614614
"regex-syntax 0.8.5",
615615
"semver",
616616
"serde",
617-
"serde_json",
618-
"tempfile",
619617
"toml 0.7.8",
620618
"unicode-normalization",
621619
"unicode-script",
622620
"url",
623621
"walkdir",
624622
]
625623

624+
[[package]]
625+
name = "clippy_lints_internal"
626+
version = "0.0.1"
627+
dependencies = [
628+
"clippy_config",
629+
"clippy_utils",
630+
"regex",
631+
"rustc-semver",
632+
]
633+
626634
[[package]]
627635
name = "clippy_utils"
628-
version = "0.1.87"
636+
version = "0.1.88"
629637
dependencies = [
630638
"arrayvec",
631639
"itertools",
@@ -2244,22 +2252,6 @@ dependencies = [
22442252
"libc",
22452253
]
22462254

2247-
[[package]]
2248-
name = "mime"
2249-
version = "0.3.17"
2250-
source = "registry+https://github.com/rust-lang/crates.io-index"
2251-
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
2252-
2253-
[[package]]
2254-
name = "mime_guess"
2255-
version = "2.0.5"
2256-
source = "registry+https://github.com/rust-lang/crates.io-index"
2257-
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
2258-
dependencies = [
2259-
"mime",
2260-
"unicase",
2261-
]
2262-
22632255
[[package]]
22642256
name = "minifier"
22652257
version = "0.3.5"
@@ -3084,45 +3076,6 @@ dependencies = [
30843076
"walkdir",
30853077
]
30863078

3087-
[[package]]
3088-
name = "rinja"
3089-
version = "0.3.5"
3090-
source = "registry+https://github.com/rust-lang/crates.io-index"
3091-
checksum = "3dc4940d00595430b3d7d5a01f6222b5e5b51395d1120bdb28d854bb8abb17a5"
3092-
dependencies = [
3093-
"itoa",
3094-
"rinja_derive",
3095-
]
3096-
3097-
[[package]]
3098-
name = "rinja_derive"
3099-
version = "0.3.5"
3100-
source = "registry+https://github.com/rust-lang/crates.io-index"
3101-
checksum = "08d9ed0146aef6e2825f1b1515f074510549efba38d71f4554eec32eb36ba18b"
3102-
dependencies = [
3103-
"basic-toml",
3104-
"memchr",
3105-
"mime",
3106-
"mime_guess",
3107-
"proc-macro2",
3108-
"quote",
3109-
"rinja_parser",
3110-
"rustc-hash 2.1.1",
3111-
"serde",
3112-
"syn 2.0.100",
3113-
]
3114-
3115-
[[package]]
3116-
name = "rinja_parser"
3117-
version = "0.3.5"
3118-
source = "registry+https://github.com/rust-lang/crates.io-index"
3119-
checksum = "93f9a866e2e00a7a1fb27e46e9e324a6f7c0e7edc4543cae1d38f4e4a100c610"
3120-
dependencies = [
3121-
"memchr",
3122-
"nom",
3123-
"serde",
3124-
]
3125-
31263079
[[package]]
31273080
name = "run_make_support"
31283081
version = "0.2.0"
@@ -3196,6 +3149,12 @@ dependencies = [
31963149
"crossbeam-utils",
31973150
]
31983151

3152+
[[package]]
3153+
name = "rustc-semver"
3154+
version = "1.1.0"
3155+
source = "registry+https://github.com/rust-lang/crates.io-index"
3156+
checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"
3157+
31993158
[[package]]
32003159
name = "rustc-stable-hash"
32013160
version = "0.1.2"

src/bootstrap/src/utils/proc_macro_deps.rs

-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ pub static CRATES: &[&str] = &[
2828
"libc",
2929
"log",
3030
"memchr",
31-
"mime",
32-
"mime_guess",
3331
"minimal-lexical",
3432
"nom",
3533
"once_cell",
@@ -38,7 +36,6 @@ pub static CRATES: &[&str] = &[
3836
"pest_meta",
3937
"proc-macro2",
4038
"quote",
41-
"rinja_parser",
4239
"rustc-hash",
4340
"self_cell",
4441
"serde",
@@ -56,7 +53,6 @@ pub static CRATES: &[&str] = &[
5653
"unic-langid",
5754
"unic-langid-impl",
5855
"unic-langid-macros",
59-
"unicase",
6056
"unicode-ident",
6157
"unicode-width",
6258
"version_check",

src/tools/clippy/.github/workflows/clippy_changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Check Changelog
2525
if: ${{ github.event_name == 'pull_request' }}
2626
run: |
27-
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \
27+
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | \
2828
python -c "import sys, json; print(json.load(sys.stdin)['body'])")
2929
output=$(awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g")
3030
if [ -z "$output" ]; then

src/tools/clippy/.github/workflows/clippy_mq.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: cargo test --features internal -- --skip dogfood
6767

6868
- name: Test clippy_lints
69-
run: cargo test --features internal
69+
run: cargo test
7070
working-directory: clippy_lints
7171

7272
- name: Test clippy_utils

src/tools/clippy/.github/workflows/clippy_pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: cargo test --features internal
4343

4444
- name: Test clippy_lints
45-
run: cargo test --features internal
45+
run: cargo test
4646
working-directory: clippy_lints
4747

4848
- name: Test clippy_utils

src/tools/clippy/.github/workflows/deploy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
tags:
99
- rust-1.**
1010

11+
concurrency:
12+
group: ${{ github.workflow }}
13+
cancel-in-progress: false
14+
1115
env:
1216
TARGET_BRANCH: 'gh-pages'
1317
SHA: '${{ github.sha }}'

src/tools/clippy/.github/workflows/lintcheck.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666

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

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

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

102102
- name: Upload head JSON
103103
uses: actions/upload-artifact@v4

src/tools/clippy/CHANGELOG.md

+67-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,68 @@ document.
66

77
## Unreleased / Beta / In Rust Nightly
88

9-
[609cd310...master](https://github.com/rust-lang/rust-clippy/compare/609cd310...master)
9+
[3e3715c3...master](https://github.com/rust-lang/rust-clippy/compare/3e3715c3...master)
10+
11+
## Rust 1.86
12+
13+
Current stable, released 2025-04-03
14+
15+
[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)
16+
17+
### New Lints
18+
19+
* Added [`unneeded_struct_pattern`] to `style` [#13465](https://github.com/rust-lang/rust-clippy/pull/13465)
20+
* Added [`doc_overindented_list_items`] to `style` [#13711](https://github.com/rust-lang/rust-clippy/pull/13711)
21+
* Added [`manual_ok_err`] to `complexity` [#13740](https://github.com/rust-lang/rust-clippy/pull/13740)
22+
* Added [`non_std_lazy_statics`] to `pedantic` [#13770](https://github.com/rust-lang/rust-clippy/pull/13770)
23+
* Added [`manual_repeat_n`] to `style` [#13858](https://github.com/rust-lang/rust-clippy/pull/13858)
24+
* Added [`manual_option_as_slice`] to `complexity` [#13901](https://github.com/rust-lang/rust-clippy/pull/13901)
25+
* Added [`double_ended_iterator_last`] to `perf` [#13922](https://github.com/rust-lang/rust-clippy/pull/13922)
26+
* Added [`useless_nonzero_new_unchecked`] to `complexity` [#13993](https://github.com/rust-lang/rust-clippy/pull/13993)
27+
* Added [`sliced_string_as_bytes`] to `perf` [#14002](https://github.com/rust-lang/rust-clippy/pull/14002)
28+
* Added [`unnecessary_semicolon`] to `pedantic` [#14032](https://github.com/rust-lang/rust-clippy/pull/14032)
29+
* Added [`return_and_then`] to `restriction` [#14051](https://github.com/rust-lang/rust-clippy/pull/14051)
30+
* Added [`manual_slice_fill`] to `style` [#14082](https://github.com/rust-lang/rust-clippy/pull/14082)
31+
* Added [`precedence_bits`] to `restriction` [#14115](https://github.com/rust-lang/rust-clippy/pull/14115)
32+
33+
### Moves and Deprecations
34+
35+
* Moved [`redundant_locals`] to `suspicious` (from `correctness`, now warn-by-default)
36+
[#13747](https://github.com/rust-lang/rust-clippy/pull/13747)
37+
* Moved [`format_push_string`] to `pedantic` (from `restriction`)
38+
[#13894](https://github.com/rust-lang/rust-clippy/pull/13894)
39+
* Moved [`format_collect`] to `pedantic` (from `perf`, now allow-by-default)
40+
[#13894](https://github.com/rust-lang/rust-clippy/pull/13894)
41+
* Moved [`mutex_integer`] to `restriction` (from `nursery`) [#14110](https://github.com/rust-lang/rust-clippy/pull/14110)
42+
43+
### Enhancements
44+
45+
* Add `lint-inconsistent-struct-field-initializers` configuration option to [`inconsistent_struct_constructor`]
46+
[#13737](https://github.com/rust-lang/rust-clippy/pull/13737)
47+
* [`len_zero`] now also triggers if deref target implements `is_empty()`
48+
[#13871](https://github.com/rust-lang/rust-clippy/pull/13871)
49+
* [`obfuscated_if_else`] now also triggers for the `.then(..).unwrap_or(..)` pattern
50+
[#14021](https://github.com/rust-lang/rust-clippy/pull/14021)
51+
52+
### False Positive Fixes
53+
54+
* [`trailing_empty_array`] no longer triggers in tests [#13844](https://github.com/rust-lang/rust-clippy/pull/13844)
55+
* [`missing_const_for_fn`] no longer triggers in tests [#13945](https://github.com/rust-lang/rust-clippy/pull/13945)
56+
* [`significant_drop_in_scrutinee`]: do not falsely warn for temporaries created by `.await` expansion
57+
[#13985](https://github.com/rust-lang/rust-clippy/pull/13985)
58+
59+
### ICE Fixes
60+
61+
* [`borrow_interior_mutable_const`] Fix an ICE that can occur when taking a reference to a tuple/`struct` field of an
62+
interior mutable `const` [#13877](https://github.com/rust-lang/rust-clippy/pull/13877)
63+
64+
### Others
65+
66+
* Clippy now uses Rust edition 2024 [#13751](https://github.com/rust-lang/rust-clippy/pull/13751)
1067

1168
## Rust 1.85
1269

13-
Current stable, released 2025-02-20
70+
Released 2025-02-20
1471

1572
[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)
1673

@@ -5516,6 +5573,7 @@ Released 2018-09-13
55165573
[`cast_slice_different_sizes`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_different_sizes
55175574
[`cast_slice_from_raw_parts`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_slice_from_raw_parts
55185575
[`cfg_not_test`]: https://rust-lang.github.io/rust-clippy/master/index.html#cfg_not_test
5576+
[`char_indices_as_byte_indices`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_indices_as_byte_indices
55195577
[`char_lit_as_u8`]: https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8
55205578
[`chars_last_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp
55215579
[`chars_next_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp
@@ -5681,6 +5739,7 @@ Released 2018-09-13
56815739
[`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
56825740
[`if_then_some_else_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
56835741
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
5742+
[`ignore_without_reason`]: https://rust-lang.github.io/rust-clippy/master/index.html#ignore_without_reason
56845743
[`ignored_unit_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
56855744
[`impl_hash_borrow_with_str_and_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_hash_borrow_with_str_and_bytes
56865745
[`impl_trait_in_params`]: https://rust-lang.github.io/rust-clippy/master/index.html#impl_trait_in_params
@@ -5783,12 +5842,14 @@ Released 2018-09-13
57835842
[`macro_metavars_in_unsafe`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_metavars_in_unsafe
57845843
[`macro_use_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#macro_use_imports
57855844
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
5845+
[`manual_abs_diff`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff
57865846
[`manual_assert`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
57875847
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
57885848
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
57895849
[`manual_c_str_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals
57905850
[`manual_clamp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
57915851
[`manual_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
5852+
[`manual_dangling_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_dangling_ptr
57925853
[`manual_div_ceil`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
57935854
[`manual_filter`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter
57945855
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
@@ -6055,6 +6116,7 @@ Released 2018-09-13
60556116
[`redundant_pub_crate`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
60566117
[`redundant_slicing`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing
60576118
[`redundant_static_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
6119+
[`redundant_test_prefix`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_test_prefix
60586120
[`redundant_type_annotations`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_type_annotations
60596121
[`ref_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
60606122
[`ref_binding_to_reference`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_binding_to_reference
@@ -6156,6 +6218,7 @@ Released 2018-09-13
61566218
[`suspicious_unary_op_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_unary_op_formatting
61576219
[`suspicious_xor_used_as_pow`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_xor_used_as_pow
61586220
[`swap_ptr_to_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#swap_ptr_to_ref
6221+
[`swap_with_temporary`]: https://rust-lang.github.io/rust-clippy/master/index.html#swap_with_temporary
61596222
[`tabs_in_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
61606223
[`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment
61616224
[`temporary_cstring_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_cstring_as_ptr
@@ -6346,6 +6409,7 @@ Released 2018-09-13
63466409
[`await-holding-invalid-types`]: https://doc.rust-lang.org/clippy/lint_configuration.html#await-holding-invalid-types
63476410
[`cargo-ignore-publish`]: https://doc.rust-lang.org/clippy/lint_configuration.html#cargo-ignore-publish
63486411
[`check-incompatible-msrv-in-tests`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-incompatible-msrv-in-tests
6412+
[`check-inconsistent-struct-field-initializers`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-inconsistent-struct-field-initializers
63496413
[`check-private-items`]: https://doc.rust-lang.org/clippy/lint_configuration.html#check-private-items
63506414
[`cognitive-complexity-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#cognitive-complexity-threshold
63516415
[`disallowed-macros`]: https://doc.rust-lang.org/clippy/lint_configuration.html#disallowed-macros
@@ -6362,7 +6426,7 @@ Released 2018-09-13
63626426
[`future-size-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#future-size-threshold
63636427
[`ignore-interior-mutability`]: https://doc.rust-lang.org/clippy/lint_configuration.html#ignore-interior-mutability
63646428
[`large-error-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#large-error-threshold
6365-
[`lint-inconsistent-struct-field-initializers`]: https://doc.rust-lang.org/clippy/lint_configuration.html#lint-inconsistent-struct-field-initializers
6429+
[`lint-commented-code`]: https://doc.rust-lang.org/clippy/lint_configuration.html#lint-commented-code
63666430
[`literal-representation-threshold`]: https://doc.rust-lang.org/clippy/lint_configuration.html#literal-representation-threshold
63676431
[`matches-for-let-else`]: https://doc.rust-lang.org/clippy/lint_configuration.html#matches-for-let-else
63686432
[`max-fn-params-bools`]: https://doc.rust-lang.org/clippy/lint_configuration.html#max-fn-params-bools

0 commit comments

Comments
 (0)