Skip to content

Commit 0441525

Browse files
committed
Merge remote-tracking branch 'upstream/master' into clippy-fix
2 parents 680cc2f + c496f4e commit 0441525

File tree

256 files changed

+2940
-2072
lines changed

Some content is hidden

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

256 files changed

+2940
-2072
lines changed

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
2-
31
* text=auto eol=lf
4-
*.rs rust
2+
*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
53
*.fixed linguist-language=Rust

.github/deploy.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ if [[ -n $TAG_NAME ]]; then
1717
ln -s "$TAG_NAME" out/stable
1818
fi
1919

20+
if [[ $BETA = "true" ]]; then
21+
echo "Update documentation for the beta release"
22+
cp -r out/master out/beta
23+
fi
24+
2025
# Generate version index that is shown as root index page
2126
cp util/gh-pages/versions.html out/index.html
2227

@@ -35,12 +40,15 @@ fi
3540

3641
if [[ -n $TAG_NAME ]]; then
3742
# Add the new dir
38-
git add $TAG_NAME
43+
git add "$TAG_NAME"
3944
# Update the symlink
4045
git add stable
4146
# Update versions file
4247
git add versions.json
4348
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
49+
elif [[ $BETA = "true" ]]; then
50+
git add beta
51+
git commit -m "Automatic deploy to GitHub Pages (beta): ${SHA}"
4452
else
4553
git add .
4654
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"

.github/workflows/clippy_bors.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ jobs:
234234
- 'rust-lang/cargo'
235235
- 'rust-lang/rls'
236236
- 'rust-lang/chalk'
237-
- 'rust-lang/rustfmt'
237+
# FIXME: Disabled until https://github.com/rust-lang/rust/issues/71077 is fixed
238+
# - 'rust-lang/rustfmt'
238239
- 'Marwes/combine'
239240
- 'Geal/nom'
240241
- 'rust-lang/stdarch'

.github/workflows/clippy_dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
run: cargo build --features deny-warnings
3939
working-directory: clippy_dev
4040

41-
- name: Test limit-stderr-length
42-
run: cargo dev --limit-stderr-length
41+
- name: Test limit_stderr_length
42+
run: cargo dev limit_stderr_length
4343

4444
- name: Test update_lints
4545
run: cargo dev update_lints --check

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- beta
78
tags:
89
- rust-1.**
910

@@ -34,6 +35,9 @@ jobs:
3435
run: |
3536
TAG=$(basename ${{ github.ref }})
3637
echo "::set-env name=TAG_NAME::$TAG"
38+
- name: Set beta to true
39+
if: github.ref == 'refs/heads/beta'
40+
run: echo "::set-env name=BETA::true"
3741
- name: Deploy
3842
run: |
3943
eval "$(ssh-agent -s)"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,7 @@ Released 2018-09-13
12711271
[`float_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_arithmetic
12721272
[`float_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
12731273
[`float_cmp_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp_const
1274+
[`fn_address_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_address_comparisons
12741275
[`fn_params_excessive_bools`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_params_excessive_bools
12751276
[`fn_to_numeric_cast`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast
12761277
[`fn_to_numeric_cast_with_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#fn_to_numeric_cast_with_truncation
@@ -1432,6 +1433,7 @@ Released 2018-09-13
14321433
[`range_plus_one`]: https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one
14331434
[`range_step_by_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#range_step_by_zero
14341435
[`range_zip_with_len`]: https://rust-lang.github.io/rust-clippy/master/index.html#range_zip_with_len
1436+
[`redundant_allocation`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_allocation
14351437
[`redundant_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
14361438
[`redundant_closure`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
14371439
[`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
@@ -1446,6 +1448,7 @@ Released 2018-09-13
14461448
[`replace_consts`]: https://rust-lang.github.io/rust-clippy/master/index.html#replace_consts
14471449
[`rest_pat_in_fully_bound_structs`]: https://rust-lang.github.io/rust-clippy/master/index.html#rest_pat_in_fully_bound_structs
14481450
[`result_expect_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_expect_used
1451+
[`result_map_or_into_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_or_into_option
14491452
[`result_map_unit_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_unit_fn
14501453
[`result_map_unwrap_or_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_map_unwrap_or_else
14511454
[`result_unwrap_used`]: https://rust-lang.github.io/rust-clippy/master/index.html#result_unwrap_used
@@ -1540,6 +1543,7 @@ Released 2018-09-13
15401543
[`vec_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#vec_box
15411544
[`verbose_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#verbose_bit_mask
15421545
[`verbose_file_reads`]: https://rust-lang.github.io/rust-clippy/master/index.html#verbose_file_reads
1546+
[`vtable_address_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#vtable_address_comparisons
15431547
[`while_immutable_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_immutable_condition
15441548
[`while_let_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop
15451549
[`while_let_on_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ High level approach:
3636

3737
### Finding something to fix/improve
3838

39-
All issues on Clippy are mentored, if you want help with a bug just ask @Manishearth, @llogiq, @mcarton or @oli-obk.
39+
All issues on Clippy are mentored, if you want help with a bug just ask
40+
@Manishearth, @flip1995, @phansch or @yaahc.
4041

4142
Some issues are easier than others. The [`good first issue`] label can be used to find the easy issues.
4243
If you want to work on an issue, please leave a comment so that we can assign it to you!
@@ -70,24 +71,22 @@ an AST expression). `match_def_path()` in Clippy's `utils` module can also be us
7071
[`T-AST`]: https://github.com/rust-lang/rust-clippy/labels/T-AST
7172
[`T-middle`]: https://github.com/rust-lang/rust-clippy/labels/T-middle
7273
[`E-medium`]: https://github.com/rust-lang/rust-clippy/labels/E-medium
73-
[`ty`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty
74+
[`ty`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty
7475
[nodes in the AST docs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/
7576
[deep-nesting]: https://github.com/rust-lang/rust-clippy/blob/557f6848bd5b7183f55c1e1522a326e9e1df6030/clippy_lints/src/mem_forget.rs#L29-L43
7677
[if_chain]: https://docs.rs/if_chain/*/if_chain
7778
[nest-less]: https://github.com/rust-lang/rust-clippy/blob/557f6848bd5b7183f55c1e1522a326e9e1df6030/clippy_lints/src/bit_mask.rs#L124-L150
7879

7980
## Writing code
8081

81-
Have a look at the [docs for writing lints][adding_lints] for more details. [Llogiq's blog post on lints]
82-
is also a nice primer to lint-writing, though it does get into advanced stuff and may be a bit outdated.
82+
Have a look at the [docs for writing lints][adding_lints] for more details.
8383

8484
If you want to add a new lint or change existing ones apart from bugfixing, it's
8585
also a good idea to give the [stability guarantees][rfc_stability] and
8686
[lint categories][rfc_lint_cats] sections of the [Clippy 1.0 RFC][clippy_rfc] a
8787
quick read.
8888

8989
[adding_lints]: https://github.com/rust-lang/rust-clippy/blob/master/doc/adding_lints.md
90-
[Llogiq's blog post on lints]: https://llogiq.github.io/2015/06/04/workflows.html
9190
[clippy_rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md
9291
[rfc_stability]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#stability-guarantees
9392
[rfc_lint_cats]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories
@@ -223,7 +222,7 @@ You can find the Clippy bors queue [here][homu_queue].
223222
If you have @bors permissions, you can find an overview of the available
224223
commands [here][homu_instructions].
225224

226-
[triage]: https://forge.rust-lang.org/triage-procedure.html
225+
[triage]: https://forge.rust-lang.org/release/triage-procedure.html
227226
[l-crash]: https://github.com/rust-lang/rust-clippy/labels/L-crash%20%3Aboom%3A
228227
[l-bug]: https://github.com/rust-lang/rust-clippy/labels/L-bug%20%3Abeetle%3A
229228
[homu]: https://github.com/rust-lang/homu

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ lazy_static = "1.0"
4242

4343
[dev-dependencies]
4444
cargo_metadata = "0.9.0"
45-
compiletest_rs = { version = "0.4.0", features = ["tmp"] }
45+
compiletest_rs = { version = "0.5.0", features = ["tmp"] }
4646
tester = "0.7"
4747
lazy_static = "1.0"
4848
clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
77

8-
[There are 362 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
8+
[There are over 350 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
99

1010
We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
1111

@@ -90,14 +90,6 @@ Note that this is still experimental and only supported on the nightly channel:
9090
cargo fix -Z unstable-options --clippy
9191
```
9292

93-
#### Running only a single lint
94-
95-
If you care only about the warnings of a single lint and want to ignore everything else, you
96-
can first deny all the clippy lints and then explicitly enable the lint(s) you care about:
97-
````
98-
cargo clippy -- -Aclippy::all -Wclippy::useless_format
99-
````
100-
10193
### Running Clippy from the command line without installing it
10294

10395
To have cargo compile your crate with Clippy without Clippy installation
@@ -183,6 +175,8 @@ If you do not want to include your lint levels in your code, you can globally en
183175
flags to Clippy during the run: `cargo clippy -- -A clippy::lint_name` will run Clippy with `lint_name` disabled and
184176
`cargo clippy -- -W clippy::lint_name` will run it with that enabled. This also works with lint groups. For example you
185177
can run Clippy with warnings for all lints enabled: `cargo clippy -- -W clippy::pedantic`
178+
If you care only about a single lint, you can allow all others and then explicitly reenable
179+
the lint(s) you are interested in: `cargo clippy -- -Aclippy::all -Wclippy::useless_format -Wclippy::...`
186180

187181
## Contributing
188182

clippy_dev/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
bytecount = "0.6"
99
clap = "2.33"
10-
itertools = "0.8"
10+
itertools = "0.9"
1111
regex = "1"
1212
lazy_static = "1.0"
1313
shell-escape = "0.1"

0 commit comments

Comments
 (0)