Skip to content

Commit 626649f

Browse files
committed
Auto merge of #88615 - flip1995:clippyup, r=Manishearth
Update Clippy r? `@Manishearth`
2 parents 97032a6 + fe247b4 commit 626649f

File tree

183 files changed

+4149
-1295
lines changed

Some content is hidden

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

183 files changed

+4149
-1295
lines changed

Diff for: Cargo.lock

+10-11
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ dependencies = [
293293
"humantime 2.0.1",
294294
"ignore",
295295
"im-rc",
296-
"itertools 0.10.0",
296+
"itertools 0.10.1",
297297
"jobserver",
298298
"lazy_static",
299299
"lazycell",
@@ -388,7 +388,7 @@ dependencies = [
388388
"flate2",
389389
"git2",
390390
"glob",
391-
"itertools 0.10.0",
391+
"itertools 0.10.1",
392392
"lazy_static",
393393
"remove_dir_all",
394394
"serde_json",
@@ -554,13 +554,16 @@ dependencies = [
554554

555555
[[package]]
556556
name = "clippy"
557-
version = "0.1.56"
557+
version = "0.1.57"
558558
dependencies = [
559559
"cargo_metadata 0.12.0",
560560
"clippy_lints",
561+
"clippy_utils",
561562
"compiletest_rs 0.6.0",
562563
"derive-new",
563564
"filetime",
565+
"if_chain",
566+
"itertools 0.10.1",
564567
"quote",
565568
"regex",
566569
"rustc-workspace-hack",
@@ -587,7 +590,7 @@ dependencies = [
587590

588591
[[package]]
589592
name = "clippy_lints"
590-
version = "0.1.56"
593+
version = "0.1.57"
591594
dependencies = [
592595
"cargo_metadata 0.12.0",
593596
"clippy_utils",
@@ -608,14 +611,10 @@ dependencies = [
608611

609612
[[package]]
610613
name = "clippy_utils"
611-
version = "0.1.56"
614+
version = "0.1.57"
612615
dependencies = [
613616
"if_chain",
614-
"itertools 0.9.0",
615-
"regex-syntax",
616617
"rustc-semver",
617-
"serde",
618-
"unicode-normalization",
619618
]
620619

621620
[[package]]
@@ -1744,9 +1743,9 @@ dependencies = [
17441743

17451744
[[package]]
17461745
name = "itertools"
1747-
version = "0.10.0"
1746+
version = "0.10.1"
17481747
source = "registry+https://github.com/rust-lang/crates.io-index"
1749-
checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319"
1748+
checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf"
17501749
dependencies = [
17511750
"either",
17521751
]

Diff for: src/tools/clippy/.cargo/config

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ lintcheck = "run --target-dir lintcheck/target --package lintcheck --bin lintche
55
collect-metadata = "test --test dogfood --features metadata-collector-lint -- run_metadata_collection_lint --ignored"
66

77
[build]
8-
rustflags = ["-Zunstable-options"]
8+
# -Zbinary-dep-depinfo allows us to track which rlib files to use for compiling UI tests
9+
rustflags = ["-Zunstable-options", "-Zbinary-dep-depinfo"]

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/blank_issue.md

+14
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,17 @@
22
name: Blank Issue
33
about: Create a blank issue.
44
---
5+
6+
7+
<!--
8+
Additional labels can be added to this issue by including the following command
9+
(without the space after the @ symbol):
10+
11+
`@rustbot label +<label>`
12+
13+
Common labels for this issue type are:
14+
* C-an-interesting-project
15+
* C-enhancement
16+
* C-question
17+
* C-tracking-issue
18+
-->

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/bug_report.md

+18-22
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,24 @@ Instead, this happened: *explanation*
2020

2121
### Meta
2222

23-
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
24-
- `rustc -Vv`:
25-
```
26-
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
27-
binary: rustc
28-
commit-hash: f455e46eae1a227d735091091144601b467e1565
29-
commit-date: 2020-06-20
30-
host: x86_64-unknown-linux-gnu
31-
release: 1.46.0-nightly
32-
LLVM version: 10.0
33-
```
23+
**Rust version (`rustc -Vv`):**
24+
25+
```
26+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
27+
binary: rustc
28+
commit-hash: f455e46eae1a227d735091091144601b467e1565
29+
commit-date: 2020-06-20
30+
host: x86_64-unknown-linux-gnu
31+
release: 1.46.0-nightly
32+
LLVM version: 10.0
33+
```
3434

3535
<!--
36-
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
37-
environment. E.g. `RUST_BACKTRACE=1 cargo clippy`.
36+
Additional labels can be added to this issue by including the following command
37+
(without the space after the @ symbol):
38+
39+
`@rustbot label +<label>`
40+
41+
Common labels for this issue type are:
42+
* `I-suggestion-causes-error`
3843
-->
39-
<details><summary>Backtrace</summary>
40-
<p>
41-
42-
```
43-
<backtrace>
44-
```
45-
46-
</p>
47-
</details>

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/false_negative.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Instead, this happened: *explanation*
2222

2323
### Meta
2424

25-
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
26-
- `rustc -Vv`:
27-
```
28-
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
29-
binary: rustc
30-
commit-hash: f455e46eae1a227d735091091144601b467e1565
31-
commit-date: 2020-06-20
32-
host: x86_64-unknown-linux-gnu
33-
release: 1.46.0-nightly
34-
LLVM version: 10.0
35-
```
25+
**Rust version (`rustc -Vv`):**
26+
27+
```
28+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
29+
binary: rustc
30+
commit-hash: f455e46eae1a227d735091091144601b467e1565
31+
commit-date: 2020-06-20
32+
host: x86_64-unknown-linux-gnu
33+
release: 1.46.0-nightly
34+
LLVM version: 10.0
35+
```

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/false_positive.md

+20-11
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,23 @@ Instead, this happened: *explanation*
2222

2323
### Meta
2424

25-
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
26-
- `rustc -Vv`:
27-
```
28-
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
29-
binary: rustc
30-
commit-hash: f455e46eae1a227d735091091144601b467e1565
31-
commit-date: 2020-06-20
32-
host: x86_64-unknown-linux-gnu
33-
release: 1.46.0-nightly
34-
LLVM version: 10.0
35-
```
25+
**Rust version (`rustc -Vv`):**
26+
```
27+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
28+
binary: rustc
29+
commit-hash: f455e46eae1a227d735091091144601b467e1565
30+
commit-date: 2020-06-20
31+
host: x86_64-unknown-linux-gnu
32+
release: 1.46.0-nightly
33+
LLVM version: 10.0
34+
```
35+
36+
<!--
37+
Additional labels can be added to this issue by including the following command
38+
(without the space after the @ symbol):
39+
40+
`@rustbot label +<label>`
41+
42+
Common labels for this issue type are:
43+
* I-suggestion-causes-error
44+
-->

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/ice.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
2020

2121
### Meta
2222

23-
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
24-
- `rustc -Vv`:
25-
```
26-
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
27-
binary: rustc
28-
commit-hash: f455e46eae1a227d735091091144601b467e1565
29-
commit-date: 2020-06-20
30-
host: x86_64-unknown-linux-gnu
31-
release: 1.46.0-nightly
32-
LLVM version: 10.0
33-
```
23+
**Rust version (`rustc -Vv`):**
24+
```
25+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
26+
binary: rustc
27+
commit-hash: f455e46eae1a227d735091091144601b467e1565
28+
commit-date: 2020-06-20
29+
host: x86_64-unknown-linux-gnu
30+
release: 1.46.0-nightly
31+
LLVM version: 10.0
32+
```
3433

3534
### Error output
3635

Diff for: src/tools/clippy/.github/workflows/clippy_dev.yml

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ jobs:
4242
run: cargo build --features deny-warnings
4343
working-directory: clippy_dev
4444

45-
- name: Test limit_stderr_length
46-
run: cargo dev limit_stderr_length
47-
4845
- name: Test update_lints
4946
run: cargo dev update_lints --check
5047

Diff for: src/tools/clippy/CHANGELOG.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ Released 2020-11-19
964964
[#5907](https://github.com/rust-lang/rust-clippy/pull/5907)
965965
* [`suspicious_arithmetic_impl`]: extend to implementations of `BitAnd`, `BitOr`, `BitXor`, `Rem`, `Shl`, and `Shr`
966966
[#5884](https://github.com/rust-lang/rust-clippy/pull/5884)
967-
* [`invalid_atomic_ordering`]: detect misuse of `compare_exchange`, `compare_exchange_weak`, and `fetch_update`
967+
* `invalid_atomic_ordering`: detect misuse of `compare_exchange`, `compare_exchange_weak`, and `fetch_update`
968968
[#6025](https://github.com/rust-lang/rust-clippy/pull/6025)
969969
* Avoid [`redundant_pattern_matching`] triggering in macros
970970
[#6069](https://github.com/rust-lang/rust-clippy/pull/6069)
@@ -1451,7 +1451,7 @@ Released 2020-03-12
14511451
* [`option_as_ref_deref`] [#4945](https://github.com/rust-lang/rust-clippy/pull/4945)
14521452
* [`wildcard_in_or_patterns`] [#4960](https://github.com/rust-lang/rust-clippy/pull/4960)
14531453
* [`iter_nth_zero`] [#4966](https://github.com/rust-lang/rust-clippy/pull/4966)
1454-
* [`invalid_atomic_ordering`] [#4999](https://github.com/rust-lang/rust-clippy/pull/4999)
1454+
* `invalid_atomic_ordering` [#4999](https://github.com/rust-lang/rust-clippy/pull/4999)
14551455
* [`skip_while_next`] [#5067](https://github.com/rust-lang/rust-clippy/pull/5067)
14561456

14571457
### Moves and Deprecations
@@ -2613,6 +2613,7 @@ Released 2018-09-13
26132613
[`deprecated_cfg_attr`]: https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
26142614
[`deprecated_semver`]: https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
26152615
[`deref_addrof`]: https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
2616+
[`derivable_impls`]: https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
26162617
[`derive_hash_xor_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
26172618
[`derive_ord_xor_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
26182619
[`disallowed_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_method
@@ -2712,7 +2713,6 @@ Released 2018-09-13
27122713
[`integer_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
27132714
[`integer_division`]: https://rust-lang.github.io/rust-clippy/master/index.html#integer_division
27142715
[`into_iter_on_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
2715-
[`invalid_atomic_ordering`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_atomic_ordering
27162716
[`invalid_null_ptr_usage`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_null_ptr_usage
27172717
[`invalid_regex`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_regex
27182718
[`invalid_upcast_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#invalid_upcast_comparisons
@@ -2754,6 +2754,7 @@ Released 2018-09-13
27542754
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
27552755
[`manual_range_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
27562756
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
2757+
[`manual_split_once`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once
27572758
[`manual_str_repeat`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat
27582759
[`manual_strip`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
27592760
[`manual_swap`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap
@@ -2795,6 +2796,7 @@ Released 2018-09-13
27952796
[`missing_safety_doc`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
27962797
[`mistyped_literal_suffixes`]: https://rust-lang.github.io/rust-clippy/master/index.html#mistyped_literal_suffixes
27972798
[`mixed_case_hex_literals`]: https://rust-lang.github.io/rust-clippy/master/index.html#mixed_case_hex_literals
2799+
[`mod_module_files`]: https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
27982800
[`module_inception`]: https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
27992801
[`module_name_repetitions`]: https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
28002802
[`modulo_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#modulo_arithmetic
@@ -2821,13 +2823,15 @@ Released 2018-09-13
28212823
[`needless_doctest_main`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
28222824
[`needless_for_each`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_for_each
28232825
[`needless_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
2826+
[`needless_option_as_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
28242827
[`needless_pass_by_value`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
28252828
[`needless_question_mark`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
28262829
[`needless_range_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
28272830
[`needless_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
28282831
[`needless_update`]: https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
28292832
[`neg_cmp_op_on_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord
28302833
[`neg_multiply`]: https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply
2834+
[`negative_feature_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#negative_feature_names
28312835
[`never_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#never_loop
28322836
[`new_ret_no_self`]: https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
28332837
[`new_without_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
@@ -2881,6 +2885,7 @@ Released 2018-09-13
28812885
[`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
28822886
[`redundant_closure_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
28832887
[`redundant_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
2888+
[`redundant_feature_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_feature_names
28842889
[`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
28852890
[`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
28862891
[`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
@@ -2903,6 +2908,7 @@ Released 2018-09-13
29032908
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
29042909
[`self_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_assignment
29052910
[`self_named_constructors`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors
2911+
[`self_named_module_files`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_named_module_files
29062912
[`semicolon_if_nothing_returned`]: https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
29072913
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
29082914
[`shadow_reuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_reuse

Diff for: src/tools/clippy/Cargo.toml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.56"
3+
version = "0.1.57"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"
@@ -32,11 +32,7 @@ tempfile = { version = "3.1.0", optional = true }
3232
cargo_metadata = "0.12"
3333
compiletest_rs = { version = "0.6.0", features = ["tmp"] }
3434
tester = "0.9"
35-
serde = { version = "1.0", features = ["derive"] }
36-
derive-new = "0.5"
3735
regex = "1.4"
38-
quote = "1"
39-
syn = { version = "1", features = ["full"] }
4036
# This is used by the `collect-metadata` alias.
4137
filetime = "0.2"
4238

@@ -45,6 +41,15 @@ filetime = "0.2"
4541
# for more information.
4642
rustc-workspace-hack = "1.0.0"
4743

44+
# UI test dependencies
45+
clippy_utils = { path = "clippy_utils" }
46+
derive-new = "0.5"
47+
if_chain = "1.0"
48+
itertools = "0.10.1"
49+
quote = "1"
50+
serde = { version = "1.0", features = ["derive"] }
51+
syn = { version = "1", features = ["full"] }
52+
4853
[build-dependencies]
4954
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }
5055

Diff for: src/tools/clippy/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ or in Travis CI.
4545
One way to use Clippy is by installing Clippy through rustup as a cargo
4646
subcommand.
4747

48-
#### Step 1: Install rustup
48+
#### Step 1: Install Rustup
4949

50-
You can install [rustup](https://rustup.rs/) on supported platforms. This will help
50+
You can install [Rustup](https://rustup.rs/) on supported platforms. This will help
5151
us install Clippy and its dependencies.
5252

53-
If you already have rustup installed, update to ensure you have the latest
54-
rustup and compiler:
53+
If you already have Rustup installed, update to ensure you have the latest
54+
Rustup and compiler:
5555

5656
```terminal
5757
rustup update

Diff for: src/tools/clippy/clippy_dev/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pub mod fmt;
1717
pub mod new_lint;
1818
pub mod serve;
1919
pub mod setup;
20-
pub mod stderr_length_check;
2120
pub mod update_lints;
2221

2322
static DEC_CLIPPY_LINT_RE: SyncLazy<Regex> = SyncLazy::new(|| {

0 commit comments

Comments
 (0)