Skip to content

Commit 78c740e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into rustup
2 parents 36a27ec + 8222d48 commit 78c740e

File tree

247 files changed

+12812
-10293
lines changed

Some content is hidden

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

247 files changed

+12812
-10293
lines changed

.github/workflows/clippy.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727

2828
jobs:
2929
base:
30+
# NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
3031
runs-on: ubuntu-latest
3132

3233
steps:
@@ -50,11 +51,16 @@ jobs:
5051
- name: Build
5152
run: cargo build --features deny-warnings,internal-lints
5253

53-
- name: Test "--fix -Zunstable-options"
54-
run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options
54+
- name: Test
55+
run: cargo test --features deny-warnings,internal-lints
5556

56-
- name: Test Workspace
57-
run: cargo test --all --features deny-warnings,internal-lints
57+
- name: Test clippy_lints
58+
run: cargo test --features deny-warnings,internal-lints
59+
working-directory: clippy_lints
60+
61+
- name: Test rustc_tools_util
62+
run: cargo test --features deny-warnings
63+
working-directory: rustc_tools_util
5864

5965
- name: Test clippy_dev
6066
run: cargo test --features deny-warnings
@@ -64,6 +70,10 @@ jobs:
6470
run: ../target/debug/cargo-clippy
6571
working-directory: clippy_workspace_tests
6672

73+
- name: Test cargo-clippy --fix
74+
run: ../target/debug/cargo-clippy clippy --fix -Zunstable-options
75+
working-directory: clippy_workspace_tests
76+
6777
- name: Test clippy-driver
6878
run: bash .github/driver.sh
6979
env:

.github/workflows/clippy_bors.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272

7373
runs-on: ${{ matrix.os }}
7474

75+
# NOTE: If you modify this job, make sure you copy the changes to clippy.yml
7576
steps:
7677
# Setup
7778
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
@@ -112,8 +113,16 @@ jobs:
112113
- name: Build
113114
run: cargo build --features deny-warnings,internal-lints
114115

115-
- name: Test Workspace
116-
run: cargo test --all --features deny-warnings,internal-lints
116+
- name: Test
117+
run: cargo test --features deny-warnings,internal-lints
118+
119+
- name: Test clippy_lints
120+
run: cargo test --features deny-warnings,internal-lints
121+
working-directory: clippy_lints
122+
123+
- name: Test rustc_tools_util
124+
run: cargo test --features deny-warnings
125+
working-directory: rustc_tools_util
117126

118127
- name: Test clippy_dev
119128
run: cargo test --features deny-warnings
@@ -123,11 +132,22 @@ jobs:
123132
run: ../target/debug/cargo-clippy
124133
working-directory: clippy_workspace_tests
125134

135+
- name: Test cargo-clippy --fix
136+
run: ../target/debug/cargo-clippy clippy --fix -Zunstable-options
137+
working-directory: clippy_workspace_tests
138+
126139
- name: Test clippy-driver
127140
run: bash .github/driver.sh
128141
env:
129142
OS: ${{ runner.os }}
130143

144+
- name: Test cargo dev new lint
145+
run: |
146+
cargo dev new_lint --name new_early_pass --pass early
147+
cargo dev new_lint --name new_late_pass --pass late
148+
cargo check
149+
git reset --hard HEAD
150+
131151
integration_build:
132152
needs: changelog
133153
runs-on: ubuntu-latest

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,7 @@ Released 2018-09-13
21042104
[`if_not_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
21052105
[`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
21062106
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
2107+
[`implicit_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
21072108
[`implicit_hasher`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
21082109
[`implicit_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
21092110
[`implicit_saturating_sub`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub
@@ -2134,6 +2135,7 @@ Released 2018-09-13
21342135
[`invisible_characters`]: https://rust-lang.github.io/rust-clippy/master/index.html#invisible_characters
21352136
[`items_after_statements`]: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
21362137
[`iter_cloned_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
2138+
[`iter_count`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_count
21372139
[`iter_next_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_loop
21382140
[`iter_next_slice`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
21392141
[`iter_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth

Cargo.toml

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
[package]
22
name = "clippy"
33
version = "0.1.52"
4-
authors = [
5-
"Manish Goregaokar <[email protected]>",
6-
"Andre Bogus <[email protected]>",
7-
"Georg Brandl <[email protected]>",
8-
"Martin Carton <[email protected]>",
9-
"Oliver Schneider <[email protected]>"
10-
]
4+
authors = ["The Rust Clippy Developers"]
115
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
126
repository = "https://github.com/rust-lang/rust-clippy"
137
readme = "README.md"
@@ -42,6 +36,7 @@ tester = "0.9"
4236
clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }
4337
serde = { version = "1.0", features = ["derive"] }
4438
derive-new = "0.5"
39+
regex = "1.4"
4540

4641
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
4742
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
@@ -55,3 +50,7 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }
5550
deny-warnings = []
5651
integration = ["tempfile"]
5752
internal-lints = ["clippy_lints/internal-lints"]
53+
54+
[package.metadata.rust-analyzer]
55+
# This package uses #[feature(rustc_private)]
56+
rustc_private = true

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ the lint(s) you are interested in:
202202
```terminal
203203
cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
204204
```
205-
Note that if you've run clippy before, this may only take effect after you've modified a file or ran `cargo clean`.
206205

207206
### Specifying the minimum supported Rust version
208207

clippy_dev/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[package]
22
name = "clippy_dev"
33
version = "0.0.1"
4-
authors = ["Philipp Hansch <[email protected]>"]
4+
authors = ["The Rust Clippy Developers"]
55
edition = "2018"
66

7-
87
[dependencies]
98
bytecount = "0.6"
109
clap = "2.33"

clippy_dev/lintcheck_crates.toml

+13-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@ bitflags = {name = "bitflags", versions = ['1.2.1']}
1414
libc = {name = "libc", versions = ['0.2.81']}
1515
log = {name = "log", versions = ['0.4.11']}
1616
proc-macro2 = {name = "proc-macro2", versions = ['1.0.24']}
17-
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
1817
quote = {name = "quote", versions = ['1.0.7']}
1918
rand = {name = "rand", versions = ['0.7.3']}
2019
rand_core = {name = "rand_core", versions = ['0.6.0']}
2120
regex = {name = "regex", versions = ['1.3.2']}
2221
syn = {name = "syn", versions = ['1.0.54']}
2322
unicode-xid = {name = "unicode-xid", versions = ['0.2.1']}
23+
# some more of dtolnays crates
24+
anyhow = {name = "anyhow", versions = ['1.0.38']}
25+
async-trait = {name = "async-trait", versions = ['0.1.42']}
26+
cxx = {name = "cxx", versions = ['1.0.32']}
27+
ryu = {name = "ryu", version = ['1.0.5']}
28+
serde_yaml = {name = "serde_yaml", versions = ['0.8.17']}
29+
thiserror = {name = "thiserror", versions = ['1.0.24']}
30+
# some embark crates, there are other interesting crates but
31+
# unfortunately adding them increases lintcheck runtime drastically
32+
cfg-expr = {name = "cfg-expr", versions = ['0.7.1']}
33+
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
34+
rpmalloc = {name = "rpmalloc", versions = ['0.2.0']}
35+
tame-oidc = {name = "tame-oidc", versions = ['0.1.0']}

clippy_dev/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ fn test_gen_deprecated() {
530530
#[should_panic]
531531
fn test_gen_deprecated_fail() {
532532
let lints = vec![Lint::new("should_assert_eq2", "group2", "abc", None, "module_name")];
533-
let _ = gen_deprecated(lints.iter());
533+
let _deprecated_lints = gen_deprecated(lints.iter());
534534
}
535535

536536
#[test]

0 commit comments

Comments
 (0)