Skip to content

Commit 54f67d2

Browse files
committed
Auto merge of #155996 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update r? Manishearth
2 parents 6769f69 + c9aa8af commit 54f67d2

147 files changed

Lines changed: 2917 additions & 416 deletions

File tree

Some content is hidden

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

src/bootstrap/src/core/build_steps/perf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Consider setting `rust.debuginfo-level = 1` in `bootstrap.toml`."#);
196196
apply_shared_opts(&mut cmd, opts);
197197
cmd.run(builder);
198198

199-
println!("You can find the results at `{}`", &results_dir.display());
199+
println!("You can find the results at `{}`", results_dir.display());
200200
}
201201
PerfCommand::Benchmark { id, opts } => {
202202
cmd.arg("bench_local");

src/bootstrap/src/core/build_steps/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ fn attempt_toolchain_link(builder: &Builder<'_>, stage_path: &str) {
312312
eprintln!(
313313
"To manually link stage 1 build to `stage1` toolchain, run:\n
314314
`rustup toolchain link stage1 {}`",
315-
&stage_path
315+
stage_path
316316
);
317317
}
318318
}

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,9 +1349,9 @@ impl Step for Tidy {
13491349
/// for the `dev` or `nightly` channels.
13501350
fn run(self, builder: &Builder<'_>) {
13511351
let mut cmd = builder.tool_cmd(Tool::Tidy);
1352-
cmd.arg(format!("--root-path={}", &builder.src.display()));
1353-
cmd.arg(format!("--cargo-path={}", &builder.initial_cargo.display()));
1354-
cmd.arg(format!("--output-dir={}", &builder.out.display()));
1352+
cmd.arg(format!("--root-path={}", builder.src.display()));
1353+
cmd.arg(format!("--cargo-path={}", builder.initial_cargo.display()));
1354+
cmd.arg(format!("--output-dir={}", builder.out.display()));
13551355
// Tidy is heavily IO constrained. Still respect `-j`, but use a higher limit if `jobs` hasn't been configured.
13561356
let jobs = builder.config.jobs.unwrap_or_else(|| {
13571357
8 * std::thread::available_parallelism().map_or(1, std::num::NonZeroUsize::get) as u32
@@ -2576,7 +2576,7 @@ Please disable assertions with `rust.debug-assertions = false`.
25762576

25772577
builder.info(&format!(
25782578
"Check compiletest suite={} mode={} compare_mode={} ({} -> {})",
2579-
suite, mode, compare_mode, &test_compiler.host, target
2579+
suite, mode, compare_mode, test_compiler.host, target
25802580
));
25812581
let _time = helpers::timeit(builder);
25822582
try_run_tests(builder, &mut cmd, false);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
136136
137137
- name: Upload Binaries
138-
uses: actions/upload-artifact@v4
138+
uses: actions/upload-artifact@v7
139139
with:
140140
name: binaries
141141
path: target/debug
@@ -179,7 +179,7 @@ jobs:
179179
180180
# Download
181181
- name: Download target dir
182-
uses: actions/download-artifact@v6
182+
uses: actions/download-artifact@v8
183183
with:
184184
name: binaries
185185
path: target/debug

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Cache lintcheck bin
4646
id: cache-lintcheck-bin
47-
uses: actions/cache@v4
47+
uses: actions/cache@v5
4848
with:
4949
path: target/debug/lintcheck
5050
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Cache results JSON
6161
id: cache-json
62-
uses: actions/cache@v4
62+
uses: actions/cache@v5
6363
with:
6464
path: lintcheck-logs/ci_crates_logs.json
6565
key: ${{ steps.key.outputs.key }}
@@ -69,7 +69,7 @@ jobs:
6969
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
72-
uses: actions/upload-artifact@v4
72+
uses: actions/upload-artifact@v7
7373
with:
7474
name: base
7575
path: lintcheck-logs/ci_crates_logs.json
@@ -87,7 +87,7 @@ jobs:
8787

8888
- name: Cache lintcheck bin
8989
id: cache-lintcheck-bin
90-
uses: actions/cache@v4
90+
uses: actions/cache@v5
9191
with:
9292
path: target/debug/lintcheck
9393
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
@@ -100,7 +100,7 @@ jobs:
100100
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
103-
uses: actions/upload-artifact@v4
103+
uses: actions/upload-artifact@v7
104104
with:
105105
name: head
106106
path: lintcheck-logs/ci_crates_logs.json
@@ -119,14 +119,14 @@ jobs:
119119
persist-credentials: false
120120

121121
- name: Restore lintcheck bin
122-
uses: actions/cache/restore@v4
122+
uses: actions/cache/restore@v5
123123
with:
124124
path: target/debug/lintcheck
125125
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }}
126126
fail-on-cache-miss: true
127127

128128
- name: Download JSON
129-
uses: actions/download-artifact@v5
129+
uses: actions/download-artifact@v8
130130

131131
- name: Store PR number
132132
run: echo ${{ github.event.pull_request.number }} > pr.txt
@@ -140,13 +140,13 @@ jobs:
140140
./target/debug/lintcheck diff {base,head}/ci_crates_logs.json --write-summary summary.json > full_diff.md
141141
142142
- name: Upload full diff
143-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v7
144144
with:
145145
name: full_diff
146146
path: full_diff.md
147147

148148
- name: Upload summary
149-
uses: actions/upload-artifact@v4
149+
uses: actions/upload-artifact@v7
150150
with:
151151
name: summary
152152
path: |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jobs:
2727
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2828
steps:
2929
- name: Download artifact
30-
uses: actions/download-artifact@v5
30+
uses: actions/download-artifact@v8
3131
with:
3232
name: summary
3333
path: untrusted
3434
run-id: ${{ github.event.workflow_run.id }}
3535
github-token: ${{ github.token }}
3636

3737
- name: Format comment
38-
uses: actions/github-script@v8
38+
uses: actions/github-script@v9
3939
with:
4040
script: |
4141
const fs = require("fs");

src/tools/clippy/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6804,6 +6804,7 @@ Released 2018-09-13
68046804
[`inline_asm_x86_att_syntax`]: https://rust-lang.github.io/rust-clippy/master/index.html#inline_asm_x86_att_syntax
68056805
[`inline_asm_x86_intel_syntax`]: https://rust-lang.github.io/rust-clippy/master/index.html#inline_asm_x86_intel_syntax
68066806
[`inline_fn_without_body`]: https://rust-lang.github.io/rust-clippy/master/index.html#inline_fn_without_body
6807+
[`inline_modules`]: https://rust-lang.github.io/rust-clippy/master/index.html#inline_modules
68076808
[`inspect_for_each`]: https://rust-lang.github.io/rust-clippy/master/index.html#inspect_for_each
68086809
[`int_plus_one`]: https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one
68096810
[`integer_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
@@ -6878,6 +6879,7 @@ Released 2018-09-13
68786879
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
68796880
[`manual_abs_diff`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_abs_diff
68806881
[`manual_assert`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
6882+
[`manual_assert_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert_eq
68816883
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
68826884
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
68836885
[`manual_c_str_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_c_str_literals
@@ -7393,6 +7395,7 @@ Released 2018-09-13
73937395
[`used_underscore_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items
73947396
[`useless_asref`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
73957397
[`useless_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_attribute
7398+
[`useless_borrows_in_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_borrows_in_formatting
73967399
[`useless_concat`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_concat
73977400
[`useless_conversion`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
73987401
[`useless_format`]: https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

src/tools/clippy/book/src/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ This also works with lint groups. For example, you can run Clippy with warnings
7979
cargo clippy -- -W clippy::pedantic
8080
```
8181

82-
If you care only about a certain lints, you can allow all others and then explicitly warn on the lints you are
82+
If you care only about certain lints, you can allow all others and then explicitly warn on the lints you are
8383
interested in:
8484

8585
```terminal

src/tools/clippy/clippy_dev/src/new_lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ fn setup_mod_file(path: &Path, lint: &LintData<'_>) -> io::Result<&'static str>
502502
file_contents.replace_range(arr_start + 1..arr_end, &new_arr_content);
503503

504504
// Just add the mod declaration at the top, it'll be fixed by rustfmt
505-
file_contents.insert_str(0, &format!("mod {};\n", &lint.name));
505+
file_contents.insert_str(0, &format!("mod {};\n", lint.name));
506506

507507
let mut file = OpenOptions::new()
508508
.write(true)

src/tools/clippy/clippy_lints/src/arbitrary_source_item_ordering.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,15 @@ impl<'tcx> LateLintPass<'tcx> for ArbitrarySourceItemOrdering {
307307
}
308308
},
309309
ItemKind::Trait {
310-
impl_restriction:_,
311-
constness:_,
310+
impl_restriction: _,
311+
constness: _,
312312
is_auto,
313-
safety:_,
314-
ident:_,
313+
safety: _,
314+
ident: _,
315315
generics: _,
316316
bounds: _,
317-
items: item_ref}
318-
if self.enable_ordering_for_trait && *is_auto == IsAuto::No => {
317+
items: item_ref,
318+
} if self.enable_ordering_for_trait && *is_auto == IsAuto::No => {
319319
let mut cur_t: Option<(TraitItemId, Ident)> = None;
320320

321321
for &item in *item_ref {

0 commit comments

Comments
 (0)