Skip to content

Update Clippy #86782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 135 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
0854f0c
Don't trigger `field_reassign_with_default` in macros
flip1995 May 4, 2021
c64b3ff
Auto merge of #7204 - flip1995:beta_backport, r=flip1995
bors May 10, 2021
7db0e4f
Suggest `&mut iter` inside a closure for `while_let_on_iterator`
Jarcho May 21, 2021
d3c20c8
Some cleanup for use_self
camsteffen May 27, 2021
29b4b4c
Do not lint use_self on type parameters
camsteffen May 27, 2021
6c1ba7c
Fix needless_collect with binding shadowing
camsteffen May 28, 2021
21c829e
Simplify collect expr_ty
camsteffen May 28, 2021
6c27482
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
flip1995 Jun 3, 2021
cd57c23
Revert "CI: update rustup before installing the toolchain on windows"
flip1995 Jun 3, 2021
5f746a1
Auto merge of #7314 - flip1995:ci-win-rustup, r=flip1995
bors Jun 3, 2021
2563910
Don't treat `cfg!()` as a constant.
m-ou-se Jun 4, 2021
38ab1a6
Add test for not linting on assert!(cfg!(..)).
m-ou-se Jun 4, 2021
b1752f6
Auto merge of #7319 - m-ou-se:cfg-not-const, r=camsteffen
bors Jun 4, 2021
390893c
Remove `doc(include)`
jyn514 May 19, 2021
dc4ea80
Replace some std::iter::repeat with str::repeat
wooster0 Jun 4, 2021
52fc18c
Release doc: add explanation for updating the stable branch
flip1995 Jun 4, 2021
9991040
Auto merge of #7289 - camsteffen:needless-collect-shadow, r=Manishearth
bors Jun 4, 2021
b95e1f7
Revert clippy's path to the copy intrinsics (part of reverting PR 812…
pnkfelix Jun 4, 2021
e4a1e85
Auto merge of #7321 - flip1995:doc-release-stable-branch, r=xFrednet
bors Jun 5, 2021
96747c1
Enhance semicolon_if_nothing_returned according to #7324
1c3t3a Jun 5, 2021
790888d
Fixed failing tests
1c3t3a Jun 5, 2021
d7a380e
Fix FP in `default_numeric_fallback` with external macro expansion
Y-Nak Jun 5, 2021
c864e18
Remove some last remants of {push,pop}_unsafe!
syvb May 17, 2021
6bf8303
Refactored the check for two spans on the same line
1c3t3a Jun 7, 2021
967d815
Extracting `is_expr_identity_function` into `clippy_utils` for reusab…
xFrednet Jun 7, 2021
bb3b58c
Reuse `is_expr_identity_function` for `flat_map_identity`
xFrednet Jun 7, 2021
9e54ce8
Reuse `is_expr_identity_function` for `filter_map_identity`
xFrednet Jun 7, 2021
c1577ab
Auto merge of #7325 - Y-Nak:numeric-fallback, r=giraffate
bors Jun 8, 2021
07217e3
Auto merge of #7262 - Jarcho:while_let_on_iter_closure, r=xFrednet,fl…
bors Jun 8, 2021
5336f88
Move `map_identity` into the `methods` module
xFrednet Jun 7, 2021
fe549f7
redundant_clone: fix comment
lengyijun Jun 9, 2021
5ec80f3
Refactored multiline check
1c3t3a Jun 9, 2021
da0538e
Auto merge of #7330 - xFrednet:0000-refactor-map-identity, r=flip1995
bors Jun 9, 2021
dd02468
Auto merge of #7326 - 1c3t3a:1c3t3a-issue-7324, r=flip1995
bors Jun 9, 2021
ea45e2a
Add disallowed_types lint, this adds a field to the Conf struct
DevinR528 Jun 2, 2021
b792bb3
Factor out match_var
camsteffen Jun 9, 2021
0d3f289
Add FreeBSD as identifier not needing ticks
Thomasdezeeuw Jun 9, 2021
2464ee9
Auto merge of #7334 - Thomasdezeeuw:freebsd-no-ticks, r=flip1995
bors Jun 9, 2021
626dc59
Auto merge of #86003 - pnkfelix:issue-84297-revert-81238, r=Mark-Simu…
bors Jun 9, 2021
c4636ab
Auto merge of #7315 - DevinR528:disallowed-ty, r=giraffate
bors Jun 10, 2021
ce7b872
Auto merge of #7332 - lengyijun:redundant_clone_fix, r=giraffate
bors Jun 10, 2021
f7d09b4
Auto merge of #7333 - camsteffen:match-var, r=llogiq
bors Jun 10, 2021
44608b1
added lint to check for full range of vector and suggest append
Valentine-Mario Jun 10, 2021
611b74e
Add support for using qualified paths with structs in expression and …
rylev Dec 10, 2020
f1f5ccd
Auto merge of #7160 - flip1995:field_reassign_macros, r=xFrednet,cams…
bors Jun 11, 2021
70ce0c2
Remove requirement of fully qualified path for disallowed_method/type
DevinR528 Jun 11, 2021
d4eff81
fixup! Remove requirement of fully qualified path for disallowed_meth…
DevinR528 Jun 13, 2021
6379d26
Auto merge of #7288 - camsteffen:use-self2, r=phansch
bors Jun 14, 2021
a36a7c8
Auto merge of #7270 - Valentine-Mario:vec_extend_to_append, r=flip1995
bors Jun 14, 2021
2d1e9ab
Auto merge of #7345 - DevinR528:disallowed-fix, r=Manishearth
bors Jun 14, 2021
fd0ea64
Fix link
Jun 15, 2021
1ee99d9
Auto merge of #7355 - Pyther99:common-tools-link, r=camsteffen
bors Jun 15, 2021
a557f37
Improve metadata code block parsing
camsteffen Jun 14, 2021
7c9da3c
Auto merge of #7352 - camsteffen:metadata-syntax, r=xFrednet
bors Jun 15, 2021
e3eede7
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jun 17, 2021
a8fd708
Bump nightly version -> 2021-06-17
flip1995 Jun 17, 2021
8302eef
Bump Clippy version -> 0.1.55
flip1995 Jun 17, 2021
f49f1b1
Auto merge of #7364 - flip1995:rustup, r=flip1995
bors Jun 17, 2021
723f515
Add macro_braces lint to check for irregular brace use in certain macros
DevinR528 May 30, 2021
218a609
Update changelog
flip1995 Jun 17, 2021
485747e
Merge remote-tracking branch 'upstream/beta' into backport_remerge
flip1995 Jun 17, 2021
d4f908a
Auto merge of #7367 - flip1995:backport_remerge, r=flip1995
bors Jun 17, 2021
6bf8772
Auto merge of #7366 - flip1995:changelog, r=Manishearth
bors Jun 17, 2021
40fee52
Fix link in changelog
flip1995 Jun 17, 2021
d184413
Auto merge of #7371 - flip1995:changelog, r=flip1995
bors Jun 17, 2021
6e8549e
Make clippy tests happy
Rustin170506 Jun 18, 2021
e1cc628
Address comment
Rustin170506 Jun 18, 2021
ebf88c9
Auto merge of #85421 - Smittyvb:rm_pushpop_unsafe, r=matthewjasper
bors Jun 18, 2021
a40fd6d
Move from-iter-instead-of-collect to pedantic
djc Jun 18, 2021
7869e62
Auto merge of #7375 - djc:from-iter-pedantic, r=Manishearth
bors Jun 19, 2021
551931c
Auto merge of #86426 - hi-rustin:rustin-patch-lint-warn, r=Aaron1011
bors Jun 19, 2021
3120b09
Auto merge of #7299 - DevinR528:macro-brace, r=llogiq
bors Jun 19, 2021
d4c9fe7
Improve visibility&helpfulness of the 'found multiple rlibs' error
popzxc Jun 20, 2021
faa2fa7
Improve appearance
popzxc Jun 20, 2021
8276f26
Fix wrong config option being suggested for deprecated wrong_pub_self…
matthiaskrgr Jun 20, 2021
354decc
Auto merge of #85538 - r00ster91:iterrepeat, r=Mark-Simulacrum
bors Jun 20, 2021
96a9786
Fixed broken deploy script due to multiline configuration docs
xFrednet Jun 20, 2021
310a204
Provide different message for bootstrapped compiler
popzxc Jun 21, 2021
d3327bd
Auto merge of #7380 - popzxc:compile-test-helper, r=flip1995
bors Jun 21, 2021
404bd1a
Auto merge of #7382 - matthiaskrgr:config_name, r=flip1995
bors Jun 21, 2021
86bf28d
Auto merge of #7385 - xFrednet:0000-fix-broken-deploy, r=flip1995
bors Jun 21, 2021
dab42cf
Delete spaces
Jun 21, 2021
6e517e9
Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3
JohnTitor Jun 21, 2021
206bb08
Remove rustfmt workaround
camsteffen Jun 21, 2021
20cb1bc
check for unbalanced tick pairs in doc-markdown
ebobrow Jun 14, 2021
a8b374f
Auto merge of #7386 - camsteffen:fmt-workaround, r=flip1995
bors Jun 21, 2021
48fa1dc
Auto merge of #7357 - ebobrow:unbalanced-tick, r=xFrednet,flip1995
bors Jun 21, 2021
9301ffb
Update opener.
ehuss Jun 22, 2021
d2087ad
Remove bad cast in test, cover more cases
ranweiler Jun 23, 2021
10122e4
Remove shadowed receiver in check invocation
ranweiler Jun 23, 2021
642239c
Update var name in test
ranweiler Jun 23, 2021
417401f
Auto merge of #7394 - ehuss:update-opener, r=ehuss
bors Jun 23, 2021
d568387
Auto merge of #7396 - ranweiler:zero-offset, r=Manishearth
bors Jun 23, 2021
9492de5
Add import_rename lint, this adds a field on the Conf struct
DevinR528 May 31, 2021
b286b38
Auto merge of #7300 - DevinR528:import-rename, r=camsteffen
bors Jun 24, 2021
0941d9f
Moved dev `ide_setup` to `setup/intellij.rs`
xFrednet Jun 10, 2021
0a5f28c
Added `cargo dev setup git-hook`
xFrednet Jun 10, 2021
41bc0f4
Adjust pre-commit script to readd files after formatting
xFrednet Jun 15, 2021
3d09849
Print cargo dev help on missing arg and updated setup documentation
xFrednet Jun 15, 2021
b48f041
Added the `cargo dev remove` command for convenience
xFrednet Jun 16, 2021
8fdf289
Updated `cargo dev setup intellij` for cleaner user messages
xFrednet Jun 21, 2021
f0fa363
Added `cargo dev remove intellij`
xFrednet Jun 22, 2021
8e969cd
Updated several clippy_dev messages and types (PR suggestions)
xFrednet Jun 23, 2021
a03dfb9
Auto merge of #7361 - xFrednet:5394-expand-setup-command, r=flip1995
bors Jun 25, 2021
39856b1
Improve lint message for match-same-arms lint
popzxc Jun 22, 2021
28d3873
Do not spawn blacklisted_name lint in test context
popzxc Jun 19, 2021
8d427b6
Auto merge of #7379 - popzxc:issue-7305, r=flip1995
bors Jun 25, 2021
abc9a46
Fix clippy test
rylev Jun 25, 2021
7e21db5
Add suspicious group
camsteffen Jun 14, 2021
f02632c
Move some lints to suspicious
camsteffen Jun 14, 2021
5b5f0ea
Add remark-gfm to workflow job
camsteffen Jun 25, 2021
3e59563
Don't use exact definition of std's ErrorKind in test.
m-ou-se Jun 26, 2021
38569c0
Don't suggest unstable and doc(hidden) variants.
m-ou-se Jun 26, 2021
2098b27
Added `cargo dev setup vscode-tasks` for simplicity
xFrednet Jun 27, 2021
e405c68
Auto merge of #7350 - camsteffen:suspicious, r=flip1995
bors Jun 28, 2021
e400191
Updated `clippy_dev` ui message and vscode task name
xFrednet Jun 28, 2021
aa40487
Stabilize `cargo clippy --fix`
jyn514 Jun 26, 2021
f4bc9cf
Auto merge of #7409 - xFrednet:5394-vs-code-tasks, r=giraffate,flip1995
bors Jun 29, 2021
95c2ab7
Auto merge of #7405 - jyn514:fix-stable, r=camsteffen
bors Jun 29, 2021
8827e96
Make ItemKind check dry
camsteffen Jun 17, 2021
4913d82
Simplify in impl check
camsteffen Jun 16, 2021
6e801e2
Use type_of for impl self type
camsteffen Jun 16, 2021
bae76f9
Remove a visitor from use_self
camsteffen Jun 16, 2021
fbd77ef
Auto merge of #7411 - camsteffen:use-self-visitor, r=flip1995
bors Jun 29, 2021
3525a6b
Auto merge of #7390 - popzxc:issue-7331, r=flip1995
bors Jun 30, 2021
018be41
Implement 'disallowed_script_idents' lint
popzxc Jun 30, 2021
cadb93b
Auto merge of #7400 - popzxc:restrict-locales, r=Manishearth
bors Jun 30, 2021
0ffba7a
Simplify wildcard_enum_match_arm test
flip1995 Jul 1, 2021
fae7a09
match_wildcard_for_single_variants: don't produce bad suggestion
flip1995 Jul 1, 2021
753bce3
Auto merge of #7407 - m-ou-se:doc-hidden-variants, r=flip1995
bors Jul 1, 2021
a82a744
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jul 1, 2021
d446d5e
Bump nightly version -> 2021-07-01
flip1995 Jul 1, 2021
61eb38a
Auto merge of #7418 - flip1995:rustup, r=flip1995
bors Jul 1, 2021
1a385b8
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
flip1995 Jul 1, 2021
44cea51
Update Cargo.lock
flip1995 Jul 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ dependencies = [
"merge",
"num_cpus",
"once_cell",
"opener 0.5.0",
"opener",
"pretty_assertions",
"serde",
"serde_json",
Expand Down Expand Up @@ -290,7 +290,7 @@ dependencies = [
"log",
"memchr",
"num_cpus",
"opener 0.5.0",
"opener",
"openssl",
"percent-encoding 2.1.0",
"pretty_env_logger",
Expand Down Expand Up @@ -553,7 +553,7 @@ dependencies = [

[[package]]
name = "clippy"
version = "0.1.54"
version = "0.1.55"
dependencies = [
"cargo_metadata 0.12.0",
"clippy_lints",
Expand All @@ -578,15 +578,15 @@ dependencies = [
"bytecount",
"clap",
"itertools 0.9.0",
"opener 0.4.1",
"opener",
"regex",
"shell-escape",
"walkdir",
]

[[package]]
name = "clippy_lints"
version = "0.1.54"
version = "0.1.55"
dependencies = [
"cargo_metadata 0.12.0",
"clippy_utils",
Expand All @@ -601,12 +601,13 @@ dependencies = [
"serde_json",
"toml",
"unicode-normalization",
"unicode-script",
"url 2.2.2",
]

[[package]]
name = "clippy_utils"
version = "0.1.54"
version = "0.1.55"
dependencies = [
"if_chain",
"itertools 0.9.0",
Expand Down Expand Up @@ -2413,15 +2414,6 @@ dependencies = [
"winapi 0.3.9",
]

[[package]]
name = "opener"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13117407ca9d0caf3a0e74f97b490a7e64c0ae3aa90a8b7085544d0c37b6f3ae"
dependencies = [
"winapi 0.3.9",
]

[[package]]
name = "opener"
version = "0.5.0"
Expand Down Expand Up @@ -5497,9 +5489,9 @@ dependencies = [

[[package]]
name = "unicode-script"
version = "0.5.2"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79bf4d5fc96546fdb73f9827097810bbda93b11a6770ff3a54e1f445d4135787"
checksum = "098ec66172ce21cd55f8bcc786ee209dd20e04eff70acfca30cb79924d173ae9"

[[package]]
name = "unicode-security"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
working-directory: clippy_workspace_tests

- name: Test cargo-clippy --fix
run: ../target/debug/cargo-clippy clippy --fix -Zunstable-options
run: ../target/debug/cargo-clippy clippy --fix
working-directory: clippy_workspace_tests

- name: Test clippy-driver
Expand Down
7 changes: 1 addition & 6 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ jobs:
- name: Checkout
uses: actions/[email protected]

# FIXME: should not be necessary once 1.24.2 is the default version on the windows runner
- name: Update rustup
run: rustup self update
if: runner.os == 'Windows'

- name: Install toolchain
run: rustup show active-toolchain

Expand Down Expand Up @@ -139,7 +134,7 @@ jobs:
working-directory: clippy_workspace_tests

- name: Test cargo-clippy --fix
run: ../target/debug/cargo-clippy clippy --fix -Zunstable-options
run: ../target/debug/cargo-clippy clippy --fix
working-directory: clippy_workspace_tests

- name: Test clippy-driver
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/[email protected]

- name: Install remark
run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended
run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended remark-gfm

# Run
- name: Check *.md files
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/.remarkrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"plugins": [
"remark-preset-lint-recommended",
"remark-gfm",
["remark-lint-list-item-indent", false],
["remark-lint-no-literal-urls", false],
["remark-lint-no-shortcut-reference-link", false],
Expand Down
139 changes: 136 additions & 3 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,139 @@ document.

## Unreleased / In Rust Nightly

[7c7683c...master](https://github.com/rust-lang/rust-clippy/compare/7c7683c...master)
[3ae8faf...master](https://github.com/rust-lang/rust-clippy/compare/3ae8faf...master)

## Rust 1.54

Current beta, release 2021-07-29

[7c7683c...3ae8faf](https://github.com/rust-lang/rust-clippy/compare/7c7683c...3ae8faf)

### New Lints

- [`ref_binding_to_reference`]
[#7105](https://github.com/rust-lang/rust-clippy/pull/7105)
- [`needless_bitwise_bool`]
[#7133](https://github.com/rust-lang/rust-clippy/pull/7133)
- [`unused_async`] [#7225](https://github.com/rust-lang/rust-clippy/pull/7225)
- [`manual_str_repeat`]
[#7265](https://github.com/rust-lang/rust-clippy/pull/7265)
- [`suspicious_splitn`]
[#7292](https://github.com/rust-lang/rust-clippy/pull/7292)

### Moves and Deprecations

- Deprecate `pub_enum_variant_names` and `wrong_pub_self_convention` in favor of
the new `avoid_breaking_exported_api` config option (see
[Enhancements](#1-54-enhancements))
[#7187](https://github.com/rust-lang/rust-clippy/pull/7187)
- Move [`inconsistent_struct_constructor`] to `pedantic`
[#7193](https://github.com/rust-lang/rust-clippy/pull/7193)
- Move [`needless_borrow`] to `style` (now warn-by-default)
[#7254](https://github.com/rust-lang/rust-clippy/pull/7254)
- Move [`suspicious_operation_groupings`] to `nursery`
[#7266](https://github.com/rust-lang/rust-clippy/pull/7266)
- Move [`semicolon_if_nothing_returned`] to `pedantic`
[#7268](https://github.com/rust-lang/rust-clippy/pull/7268)

### Enhancements <a name="1-54-enhancements"></a>

- [`while_let_on_iterator`]: Now also lints in nested loops
[#6966](https://github.com/rust-lang/rust-clippy/pull/6966)
- [`single_char_pattern`]: Now also lints on `strip_prefix` and `strip_suffix`
[#7156](https://github.com/rust-lang/rust-clippy/pull/7156)
- [`needless_collect`]: Now also lints on assignments with type annotations
[#7163](https://github.com/rust-lang/rust-clippy/pull/7163)
- [`if_then_some_else_none`]: Now works with the MSRV config
[#7177](https://github.com/rust-lang/rust-clippy/pull/7177)
- Add `avoid_breaking_exported_api` config option for the lints
[`enum_variant_names`], [`large_types_passed_by_value`],
[`trivially_copy_pass_by_ref`], [`unnecessary_wraps`],
[`upper_case_acronyms`], and [`wrong_self_convention`]. We recommend to set
this configuration option to `false` before a major release (1.0/2.0/...) to
clean up the API [#7187](https://github.com/rust-lang/rust-clippy/pull/7187)
- [`needless_collect`]: Now lints on even more data structures
[#7188](https://github.com/rust-lang/rust-clippy/pull/7188)
- [`missing_docs_in_private_items`]: No longer sees `#[<name> = "<value>"]` like
attributes as sufficient documentation
[#7281](https://github.com/rust-lang/rust-clippy/pull/7281)
- [`needless_collect`], [`short_circuit_statement`], [`unnecessary_operation`]:
Now work as expected when used with `allow`
[#7282](https://github.com/rust-lang/rust-clippy/pull/7282)

### False Positive Fixes

- [`implicit_return`]: Now takes all diverging functions in account to avoid
false positives [#6951](https://github.com/rust-lang/rust-clippy/pull/6951)
- [`while_let_on_iterator`]: No longer lints when the iterator is a struct field
and the struct is used in the loop
[#6966](https://github.com/rust-lang/rust-clippy/pull/6966)
- [`multiple_inherent_impl`]: No longer lints with generic arguments
[#7089](https://github.com/rust-lang/rust-clippy/pull/7089)
- [`comparison_chain`]: No longer lints in a `const` context
[#7118](https://github.com/rust-lang/rust-clippy/pull/7118)
- [`while_immutable_condition`]: Fix false positive where mutation in the loop
variable wasn't picked up
[#7144](https://github.com/rust-lang/rust-clippy/pull/7144)
- [`default_trait_access`]: No longer lints in macros
[#7150](https://github.com/rust-lang/rust-clippy/pull/7150)
- [`needless_question_mark`]: No longer lints when the inner value is implicitly
dereferenced [#7165](https://github.com/rust-lang/rust-clippy/pull/7165)
- [`unused_unit`]: No longer lints when multiple macro contexts are involved
[#7167](https://github.com/rust-lang/rust-clippy/pull/7167)
- [`eval_order_dependence`]: Fix false positive in async context
[#7174](https://github.com/rust-lang/rust-clippy/pull/7174)
- [`unnecessary_filter_map`]: No longer lints if the `filter_map` changes the
type [#7175](https://github.com/rust-lang/rust-clippy/pull/7175)
- [`wrong_self_convention`]: No longer lints in trait implementations of
non-`Copy` types [#7182](https://github.com/rust-lang/rust-clippy/pull/7182)
- [`suboptimal_flops`]: No longer lints on `powi(2)`
[#7201](https://github.com/rust-lang/rust-clippy/pull/7201)
- [`wrong_self_convention`]: No longer lints if there is no implicit `self`
[#7215](https://github.com/rust-lang/rust-clippy/pull/7215)
- [`option_if_let_else`]: No longer lints on `else if let` pattern
[#7216](https://github.com/rust-lang/rust-clippy/pull/7216)
- [`use_self`], [`useless_conversion`]: Fix false positives when generic
arguments are involved
[#7223](https://github.com/rust-lang/rust-clippy/pull/7223)
- [`manual_unwrap_or`]: Fix false positive with deref coercion
[#7233](https://github.com/rust-lang/rust-clippy/pull/7233)
- [`similar_names`]: No longer lints on `wparam`/`lparam`
[#7255](https://github.com/rust-lang/rust-clippy/pull/7255)
- [`redundant_closure`]: No longer lints on using the `vec![]` macro in a
closure [#7263](https://github.com/rust-lang/rust-clippy/pull/7263)

### Suggestion Fixes/Improvements

- [`implicit_return`]
[#6951](https://github.com/rust-lang/rust-clippy/pull/6951)
- Fix suggestion for async functions
- Improve suggestion with macros
- Suggest to change `break` to `return` when appropriate
- [`while_let_on_iterator`]: Now suggests `&mut iter` when necessary
[#6966](https://github.com/rust-lang/rust-clippy/pull/6966)
- [`match_single_binding`]: Improve suggestion when match scrutinee has side
effects [#7095](https://github.com/rust-lang/rust-clippy/pull/7095)
- [`needless_borrow`]: Now suggests to also change usage sites as needed
[#7105](https://github.com/rust-lang/rust-clippy/pull/7105)
- [`write_with_newline`]: Improve suggestion when only `\n` is written to the
buffer [#7183](https://github.com/rust-lang/rust-clippy/pull/7183)
- [`from_iter_instead_of_collect`]: The suggestion is now auto applicable also
when a `<_ as Trait>::_` is involved
[#7264](https://github.com/rust-lang/rust-clippy/pull/7264)
- [`not_unsafe_ptr_arg_deref`]: Improved error message
[#7294](https://github.com/rust-lang/rust-clippy/pull/7294)

### ICE Fixes

- Fix ICE when running Clippy on `libstd`
[#7140](https://github.com/rust-lang/rust-clippy/pull/7140)
- [`implicit_return`]
[#7242](https://github.com/rust-lang/rust-clippy/pull/7242)

## Rust 1.53

Current beta, release 2021-06-17
Current stable, released 2021-06-17

[6ed6f1e...7c7683c](https://github.com/rust-lang/rust-clippy/compare/6ed6f1e...7c7683c)

Expand Down Expand Up @@ -194,7 +322,7 @@ Current beta, release 2021-06-17

## Rust 1.52

Current stable, released 2021-05-06
Released 2021-05-06

[3e41797...6ed6f1e](https://github.com/rust-lang/rust-clippy/compare/3e41797...6ed6f1e)

Expand Down Expand Up @@ -2295,6 +2423,7 @@ Released 2018-09-13
<!-- begin autogenerated links to lint list -->
[`absurd_extreme_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons
[`almost_swapped`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_swapped
[`append_instead_of_extend`]: https://rust-lang.github.io/rust-clippy/master/index.html#append_instead_of_extend
[`approx_constant`]: https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant
[`as_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#as_conversions
[`assertions_on_constants`]: https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
Expand Down Expand Up @@ -2358,6 +2487,8 @@ Released 2018-09-13
[`derive_hash_xor_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
[`derive_ord_xor_partial_ord`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
[`disallowed_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_method
[`disallowed_script_idents`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_script_idents
[`disallowed_type`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_type
[`diverging_sub_expression`]: https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
[`doc_markdown`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
[`double_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons
Expand Down Expand Up @@ -2527,6 +2658,7 @@ Released 2018-09-13
[`misrefactored_assign_op`]: https://rust-lang.github.io/rust-clippy/master/index.html#misrefactored_assign_op
[`missing_const_for_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
[`missing_docs_in_private_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
[`missing_enforced_import_renames`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_enforced_import_renames
[`missing_errors_doc`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
[`missing_inline_in_public_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
[`missing_panics_doc`]: https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
Expand Down Expand Up @@ -2574,6 +2706,7 @@ Released 2018-09-13
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
[`nonminimal_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
[`nonsensical_open_options`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonsensical_open_options
[`nonstandard_macro_braces`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonstandard_macro_braces
[`not_unsafe_ptr_arg_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
[`ok_expect`]: https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect
[`op_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To work around this, you need to have a copy of the [rustc-repo][rustc_repo] ava
`git clone https://github.com/rust-lang/rust/`.
Then you can run a `cargo dev` command to automatically make Clippy use the rustc-repo via path-dependencies
which `IntelliJ Rust` will be able to understand.
Run `cargo dev ide_setup --repo-path <repo-path>` where `<repo-path>` is a path to the rustc repo
Run `cargo dev setup intellij --repo-path <repo-path>` where `<repo-path>` is a path to the rustc repo
you just cloned.
The command will add path-dependencies pointing towards rustc-crates inside the rustc repo to
Clippys `Cargo.toml`s and should allow `IntelliJ Rust` to understand most of the types that Clippy uses.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.1.54"
version = "0.1.55"
authors = ["The Rust Clippy Developers"]
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
Expand Down
26 changes: 13 additions & 13 deletions src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ A collection of lints to catch common mistakes and improve your [Rust](https://g
Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.

| Category | Description | Default level |
| --------------------- | ----------------------------------------------------------------------- | ------------- |
| `clippy::all` | all lints that are on by default (correctness, style, complexity, perf) | **warn/deny** |
| `clippy::correctness` | code that is outright wrong or very useless | **deny** |
| `clippy::style` | code that should be written in a more idiomatic way | **warn** |
| `clippy::complexity` | code that does something simple but in a complex way | **warn** |
| `clippy::perf` | code that can be written to run faster | **warn** |
| `clippy::pedantic` | lints which are rather strict or might have false positives | allow |
| `clippy::nursery` | new lints that are still under development | allow |
| `clippy::cargo` | lints for the cargo manifest | allow |
| Category | Description | Default level |
| --------------------- | ----------------------------------------------------------------------------------- | ------------- |
| `clippy::all` | all lints that are on by default (correctness, suspicious, style, complexity, perf) | **warn/deny** |
| `clippy::correctness` | code that is outright wrong or useless | **deny** |
| `clippy::suspicious` | code that is most likely wrong or useless | **warn** |
| `clippy::style` | code that should be written in a more idiomatic way | **warn** |
| `clippy::complexity` | code that does something simple but in a complex way | **warn** |
| `clippy::perf` | code that can be written to run faster | **warn** |
| `clippy::pedantic` | lints which are rather strict or might have false positives | allow |
| `clippy::nursery` | new lints that are still under development | allow |
| `clippy::cargo` | lints for the cargo manifest | allow |

More to come, please [file an issue](https://github.com/rust-lang/rust-clippy/issues) if you have ideas!

Expand Down Expand Up @@ -75,11 +76,10 @@ cargo clippy

#### Automatically applying Clippy suggestions

Clippy can automatically apply some lint suggestions.
Note that this is still experimental and only supported on the nightly channel:
Clippy can automatically apply some lint suggestions, just like the compiler.

```terminal
cargo clippy --fix -Z unstable-options
cargo clippy --fix
```

#### Workspaces
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
bytecount = "0.6"
clap = "2.33"
itertools = "0.9"
opener = "0.4"
opener = "0.5"
regex = "1"
shell-escape = "0.1"
walkdir = "2"
Expand Down
Loading