Skip to content

Commit 58c6497

Browse files
authored
Rollup merge of #128837 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update r? ``@Manishearth`` Updates Cargo.lock due to uitest bump
2 parents 8789b95 + 8be2688 commit 58c6497

File tree

298 files changed

+5578
-4017
lines changed

Some content is hidden

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

298 files changed

+5578
-4017
lines changed

Cargo.lock

+6-5
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,15 @@ dependencies = [
564564
"termize",
565565
"tokio",
566566
"toml 0.7.8",
567-
"ui_test 0.24.0",
567+
"ui_test 0.25.0",
568568
"walkdir",
569569
]
570570

571571
[[package]]
572572
name = "clippy_config"
573573
version = "0.1.82"
574574
dependencies = [
575+
"itertools",
575576
"rustc-semver",
576577
"serde",
577578
"toml 0.7.8",
@@ -4936,9 +4937,9 @@ dependencies = [
49364937

49374938
[[package]]
49384939
name = "spanned"
4939-
version = "0.2.1"
4940+
version = "0.3.0"
49404941
source = "registry+https://github.com/rust-lang/crates.io-index"
4941-
checksum = "ed14ba8b4b82241bd5daba2c49185d4a0581a0058355fe96537338f002b8605d"
4942+
checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6"
49424943
dependencies = [
49434944
"bstr",
49444945
"color-eyre",
@@ -5562,9 +5563,9 @@ dependencies = [
55625563

55635564
[[package]]
55645565
name = "ui_test"
5565-
version = "0.24.0"
5566+
version = "0.25.0"
55665567
source = "registry+https://github.com/rust-lang/crates.io-index"
5567-
checksum = "bc1c6c78d55482388711c8d417b8e547263046a607512278fed274c54633bbe4"
5568+
checksum = "f7e4f339f62edc873975c47115f9e71c5454ddaa37c1142b42fc0b2672c8dacb"
55685569
dependencies = [
55695570
"annotate-snippets 0.11.4",
55705571
"anyhow",

src/tools/clippy/.cargo/config.toml

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ target-dir = "target"
1313

1414
[unstable]
1515
binary-dep-depinfo = true
16+
profile-rustflags = true
1617

1718
[profile.dev]
1819
split-debuginfo = "unpacked"
20+
21+
# Add back the containing directory of the packages we have to refer to using --manifest-path
22+
[profile.dev.package.clippy_dev]
23+
rustflags = ["--remap-path-prefix", "=clippy_dev"]
24+
[profile.dev.package.lintcheck]
25+
rustflags = ["--remap-path-prefix", "=lintcheck"]

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env:
2525
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
2626
NO_FMT_TEST: 1
2727
CARGO_INCREMENTAL: 0
28+
RUSTFLAGS: -D warnings
2829

2930
concurrency:
3031
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
@@ -47,25 +48,25 @@ jobs:
4748

4849
# Run
4950
- name: Build
50-
run: cargo build --tests --features deny-warnings,internal
51+
run: cargo build --tests --features internal
5152

5253
- name: Test
53-
run: cargo test --features deny-warnings,internal
54+
run: cargo test --features internal
5455

5556
- name: Test clippy_lints
56-
run: cargo test --features deny-warnings,internal
57+
run: cargo test --features internal
5758
working-directory: clippy_lints
5859

5960
- name: Test clippy_utils
60-
run: cargo test --features deny-warnings
61+
run: cargo test
6162
working-directory: clippy_utils
6263

6364
- name: Test rustc_tools_util
64-
run: cargo test --features deny-warnings
65+
run: cargo test
6566
working-directory: rustc_tools_util
6667

6768
- name: Test clippy_dev
68-
run: cargo test --features deny-warnings
69+
run: cargo test
6970
working-directory: clippy_dev
7071

7172
- name: Test clippy-driver

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

+9-8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
1212
NO_FMT_TEST: 1
1313
CARGO_INCREMENTAL: 0
14+
RUSTFLAGS: -D warnings
1415

1516
concurrency:
1617
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
@@ -85,34 +86,34 @@ jobs:
8586
8687
# Run
8788
- name: Build
88-
run: cargo build --tests --features deny-warnings,internal
89+
run: cargo build --tests --features internal
8990

9091
- name: Test
9192
if: matrix.host == 'x86_64-unknown-linux-gnu'
92-
run: cargo test --features deny-warnings,internal
93+
run: cargo test --features internal
9394

9495
- name: Test
9596
if: matrix.host != 'x86_64-unknown-linux-gnu'
96-
run: cargo test --features deny-warnings,internal -- --skip dogfood
97+
run: cargo test --features internal -- --skip dogfood
9798

9899
- name: Test clippy_lints
99-
run: cargo test --features deny-warnings,internal
100+
run: cargo test --features internal
100101
working-directory: clippy_lints
101102

102103
- name: Test clippy_utils
103-
run: cargo test --features deny-warnings
104+
run: cargo test
104105
working-directory: clippy_utils
105106

106107
- name: Test clippy_config
107-
run: cargo test --features deny-warnings
108+
run: cargo test
108109
working-directory: clippy_config
109110

110111
- name: Test rustc_tools_util
111-
run: cargo test --features deny-warnings
112+
run: cargo test
112113
working-directory: rustc_tools_util
113114

114115
- name: Test clippy_dev
115-
run: cargo test --features deny-warnings
116+
run: cargo test
116117
working-directory: clippy_dev
117118

118119
- name: Test clippy-driver

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
env:
1717
RUST_BACKTRACE: 1
1818
CARGO_INCREMENTAL: 0
19+
RUSTFLAGS: -D warnings
1920

2021
jobs:
2122
clippy_dev:
@@ -28,7 +29,7 @@ jobs:
2829

2930
# Run
3031
- name: Build
31-
run: cargo build --features deny-warnings
32+
run: cargo build
3233
working-directory: clippy_dev
3334

3435
- name: Test update_lints
@@ -38,6 +39,8 @@ jobs:
3839
run: cargo dev fmt --check
3940

4041
- name: Test cargo dev new lint
42+
env:
43+
RUSTFLAGS: -A unused-imports
4144
run: |
4245
cargo dev new_lint --name new_early_pass --pass early
4346
cargo dev new_lint --name new_late_pass --pass late

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858

5959
- name: Run lintcheck
6060
if: steps.cache-json.outputs.cache-hit != 'true'
61-
run: ./target/debug/lintcheck --format json --warn-all --crates-toml ./lintcheck/ci_crates.toml
61+
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
6262

6363
- name: Upload base JSON
6464
uses: actions/upload-artifact@v4
@@ -86,7 +86,7 @@ jobs:
8686
run: cargo build --manifest-path=lintcheck/Cargo.toml
8787

8888
- name: Run lintcheck
89-
run: ./target/debug/lintcheck --format json --warn-all --crates-toml ./lintcheck/ci_crates.toml
89+
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
9090

9191
- name: Upload head JSON
9292
uses: actions/upload-artifact@v4

src/tools/clippy/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5830,6 +5830,7 @@ Released 2018-09-13
58305830
[`result_unit_err`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
58315831
[`result_unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_unwrap_used
58325832
[`return_self_not_must_use`]: https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
5833+
[`reverse_range_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#reverse_range_loop
58335834
[`reversed_empty_ranges`]: https://rust-lang.github.io/rust-clippy/master/index.html#reversed_empty_ranges
58345835
[`same_functions_in_if_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_functions_in_if_condition
58355836
[`same_item_push`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push
@@ -5998,6 +5999,7 @@ Released 2018-09-13
59985999
[`unused_io_amount`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount
59996000
[`unused_label`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_label
60006001
[`unused_peekable`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable
6002+
[`unused_result_ok`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_result_ok
60016003
[`unused_rounding`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_rounding
60026004
[`unused_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
60036005
[`unused_unit`]: https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit

src/tools/clippy/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ color-print = "0.3.4"
3030
anstream = "0.6.0"
3131

3232
[dev-dependencies]
33-
ui_test = "0.24"
33+
ui_test = "0.25"
3434
regex = "1.5.5"
3535
toml = "0.7.3"
3636
walkdir = "2.3"
@@ -51,7 +51,6 @@ tokio = { version = "1", features = ["io-util"] }
5151
rustc_tools_util = "0.3.0"
5252

5353
[features]
54-
deny-warnings = ["clippy_lints/deny-warnings"]
5554
integration = ["tempfile"]
5655
internal = ["clippy_lints/internal", "tempfile"]
5756

src/tools/clippy/book/src/lint_configuration.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ Suppress lints whenever the suggested change would cause breakage for other crat
364364

365365

366366
## `await-holding-invalid-types`
367-
367+
The list of types which may not be held across an await point.
368368

369369
**Default Value:** `[]`
370370

@@ -668,6 +668,8 @@ crate. For example, `pub(crate)` items.
668668
## `msrv`
669669
The minimum rust version that the project supports. Defaults to the `rust-version` field in `Cargo.toml`
670670

671+
**Default Value:** `current version`
672+
671673
---
672674
**Affected lints:**
673675
* [`allow_attributes`](https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes)
@@ -862,6 +864,8 @@ The maximum number of lines a function or method can have
862864
The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by
863865
reference. By default there is no limit
864866

867+
**Default Value:** `target_pointer_width * 2`
868+
865869
---
866870
**Affected lints:**
867871
* [`trivially_copy_pass_by_ref`](https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref)

src/tools/clippy/clippy_config/Cargo.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9+
itertools = "0.12"
910
rustc-semver = "1.1"
1011
serde = { version = "1.0", features = ["derive"] }
1112
toml = "0.7.3"
1213

1314
[dev-dependencies]
1415
walkdir = "2.3"
1516

16-
[features]
17-
deny-warnings = []
18-
1917
[package.metadata.rust-analyzer]
2018
# This crate uses #[feature(rustc_private)]
2119
rustc_private = true

0 commit comments

Comments
 (0)