Skip to content
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

Update Clippy #102729

Merged
merged 188 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
abd3e7e
Allow lint passes to be bound by `TyCtxt`
Jarcho Sep 6, 2022
9136096
rustc: Parameterize `ty::Visibility` over used ID
petrochenkov Aug 27, 2022
977b6e2
Arena-allocate `hir::Lifetime`.
nnethercote Sep 1, 2022
c86a9c0
Introduce `DotDotPos`.
nnethercote Sep 1, 2022
c3db185
Rollup merge of #101498 - petrochenkov:visparam, r=cjgillot
Dylan-DPC Sep 8, 2022
30a5815
Auto merge of #101467 - nnethercote:shrink-hir-Ty-Pat, r=spastorino
bors Sep 8, 2022
9faa588
Rollup merge of #101501 - Jarcho:tcx_lint_passes, r=davidtwco
Dylan-DPC Sep 8, 2022
f47a1e2
Auto merge of #101577 - Dylan-DPC:rollup-l9xw7i7, r=Dylan-DPC
bors Sep 8, 2022
b640eaa
Remove ReEmpty
jackh726 Jun 26, 2022
ac1c68a
Make clippy happy
compiler-errors Aug 31, 2022
854f751
Appease clippy again
compiler-errors Sep 6, 2022
98bf99e
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup
flip1995 Sep 9, 2022
41b3084
rustc_error, rustc_private, rustc_ast: Switch to stable hash containers
NiklasJonsson Jul 16, 2022
42361da
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
bors Sep 10, 2022
f6005c6
Remove unused span argument from `walk_fn`.
nnethercote Sep 12, 2022
3081535
Remove unused span argument from `visit_name`.
nnethercote Sep 12, 2022
0d1469a
Remove unused argument from `visit_poly_trait_ref`.
nnethercote Sep 12, 2022
4e313a5
Auto merge of #99334 - NiklasJonsson:84447/error-privacy, r=oli-obk
bors Sep 12, 2022
c0e249c
Fix clippy.
reitermarkus Sep 1, 2022
64a42db
Simplify `clippy` fix.
reitermarkus Sep 12, 2022
b95b285
Make x.py check work
eholk Aug 30, 2022
985afe0
Auto merge of #100640 - reitermarkus:socket-display-buffer, r=thomcc
bors Sep 13, 2022
27e91b6
Address code review comments
eholk Aug 30, 2022
cf043f6
Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillot
bors Sep 14, 2022
f6a07d1
Auto merge of #101212 - eholk:dyn-star, r=compiler-errors
bors Sep 14, 2022
525e0c8
Temporarily move clippy::unused_peekable to nursery
flip1995 Sep 14, 2022
dcc6153
Auto merge of #101811 - flip1995:clippyup, r=flip1995
bors Sep 15, 2022
2be8b73
Fix clippy
est31 Feb 4, 2022
c2e9c99
Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque…
oli-obk Jul 27, 2022
3ca6b9d
Silence [`question_mark`] in const context
kraktus Sep 16, 2022
88a5796
[`drop_copy`]: Do not lint idiomatic in match arm
kraktus Sep 17, 2022
d1dbdcf
refactor `needless_return`
kraktus Sep 18, 2022
bf8870e
further refactor of `needless_return`
kraktus Sep 18, 2022
15ec5d2
further refactor
kraktus Sep 18, 2022
23d1d07
small refactor
kraktus Sep 19, 2022
70f4c71
remove the `Subst` trait, always use `EarlyBinder`
lcnr Sep 16, 2022
5c0cb0d
[`needless_return`] Recursively remove unneeded semicolons
kraktus Sep 19, 2022
d63aece
[`never_loop`]: Fix FP with let..else statements.
yotamofek Sep 19, 2022
0dc24ca
Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank
bors Sep 20, 2022
e279f22
Changelog for Rust 1.64 :apple:
xFrednet Sep 20, 2022
4d01529
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-fro…
Sep 21, 2022
4c5f230
[arithmetic-side-effects] Consider references
c410-f3r Sep 21, 2022
033dae9
Actually use the sorted vector
schubart Sep 21, 2022
09b1e8f
Add note to clippy::non_expressive_names doc
schteve Sep 21, 2022
adc7e3e
introduce mir::Unevaluated
b-naber Sep 19, 2022
c2c170a
Auto merge of #9501 - xFrednet:changelog-1.64, r=llogiq
bors Sep 22, 2022
a390115
[`nonstandard_macro_braces`] Do not modify macro arguments
kraktus Sep 19, 2022
61fd2a8
Auto merge of #9499 - kraktus:nonstandard_macro_braces, r=xFrednet
bors Sep 22, 2022
cda7547
Make `semicolon_span` code more refactor-tolerant
kraktus Sep 22, 2022
b333645
Add test with `unsafe` block to check #9503 is fixed too
kraktus Sep 22, 2022
2063b8f
Rollup merge of #102123 - schteve:clippy-note, r=Manishearth
matthiaskrgr Sep 22, 2022
49319b4
uninit_vec: special case set_len(0)
alessandrod Sep 22, 2022
628a854
Upgrade `copiletest-rs` dependency
smoelius Sep 23, 2022
26861fb
rename Unevaluated to UnevaluatedConst
b-naber Sep 22, 2022
d9277c6
Auto merge of #102056 - b-naber:unevaluated, r=lcnr
bors Sep 23, 2022
dc14531
Auto merge of #9519 - alessandrod:uninit-set-len-0, r=llogiq
bors Sep 23, 2022
c8f2f38
Auto merge of #9523 - smoelius:compiletest-rs, r=Alexendoo
bors Sep 23, 2022
ff65eec
Auto merge of #9496 - yotamofek:never_loop_let_else, r=Jarcho
bors Sep 23, 2022
781e45c
Bless clippy.
cjgillot Sep 22, 2022
e67b2bf
Apply uninlined_format-args to clippy_lints
nyurik Sep 23, 2022
cb6d126
a few more core lint fixes
nyurik Sep 23, 2022
59d0e8c
and a few more from other dirs
nyurik Sep 23, 2022
334f453
Stabilize const `BTree{Map,Set}::new`
Noratrieb Sep 23, 2022
e30b37b
Fix clippy's const fn stability check for CURRENT_RUSTC_VERSION
Noratrieb Sep 23, 2022
c2d4266
Auto merge of #9525 - nyurik:apply-lints, r=llogiq
bors Sep 23, 2022
de8a1dd
Auto merge of #102068 - cjgillot:erased-lifetime-print, r=eholk
bors Sep 24, 2022
cc6b375
fallout2: rework clippy_dev & _lints fmt inlining
nyurik Sep 24, 2022
8b1ad17
Auto merge of #9527 - nyurik:inl2, r=llogiq
bors Sep 24, 2022
fc77d91
Add `cargo lintcheck --recursive` to check dependencies of crates
Alexendoo Sep 21, 2022
ea75178
separate definitions and `HIR` owners
TaKO8Ki Sep 20, 2022
1141c55
Fix ICE in `needless_pass_by_value` with unsized `dyn Fn`
Jarcho Sep 24, 2022
5bd3b56
Auto merge of #9531 - Jarcho:ice_9459, r=llogiq
bors Sep 25, 2022
93945a5
Please move derive_partial_eq_without_eq to nursery
alex-semenyuk Sep 25, 2022
00ebd8e
Auto merge of #9535 - alex-semenyuk:move_derive_partial_eq_without_eq…
bors Sep 25, 2022
8493376
Fix panic when displaying the backtrace of failing integration tests
Jarcho Sep 25, 2022
57c9daa
Auto merge of #9533 - Jarcho:integration-ice-msg, r=llogiq
bors Sep 25, 2022
b180d95
Don't lint `*_interior_mutable_const` on unions due to potential ICE.
Jarcho Sep 25, 2022
5a71bbd
new uninlined_format_args lint to inline explicit arguments
nyurik Sep 14, 2022
c69edba
Rollup merge of #102197 - Nilstrieb:const-new-🌲, r=Mark-Simulacrum
fee1-dead Sep 26, 2022
06568fd
remove cfg(bootstrap)
pietroalbini Sep 20, 2022
cf93865
Auto merge of #9233 - nyurik:capture-vars, r=Alexendoo
bors Sep 26, 2022
78dc616
Auto merge of #9487 - kraktus:question_mark, r=Jarcho
bors Sep 27, 2022
14abb83
fix typo "Saturing" -> "Saturating"
philipcraig Sep 27, 2022
e5ce6d1
rustc_typeck to rustc_hir_analysis
lcnr Sep 26, 2022
63f441e
add `box-default` lint
llogiq Sep 21, 2022
c153bd6
Auto merge of #9539 - Jarcho:ice_9445, r=flip1995
bors Sep 27, 2022
d31db02
Auto merge of #9507 - c410-f3r:arith, r=Alexendoo
bors Sep 27, 2022
47c9145
Auto merge of #9497 - kraktus:needless_return2, r=llogiq
bors Sep 27, 2022
257fb4b
Auto merge of #9543 - philipcraig:fix-saturing-typo, r=giraffate
bors Sep 27, 2022
9aa85dc
Auto merge of #9511 - rust-lang:box-default, r=Alexendoo
bors Sep 27, 2022
5b0f46a
Don't lint unstable moves in `std_instead_of_core`
Alexendoo Sep 27, 2022
187c27e
rename `and_only_expr_in_arm` -> `is_single_call_in_arm`
kraktus Sep 27, 2022
672fb8e
Auto merge of #9491 - kraktus:drop_copy, r=Jarcho
bors Sep 27, 2022
14ba4fb
fix [`needless_borrow`] and [`explicit_auto_deref`] false positive on…
kraktus Sep 17, 2022
35b7ce5
Auto merge of #9545 - Alexendoo:std-instead-of-core-unstable, r=Manis…
bors Sep 27, 2022
7289835
[`should_implement_trait`] Also lint `default` method
kraktus Sep 27, 2022
0f6932a
Auto merge of #9546 - kraktus:default_not_default_trait, r=xFrednet
bors Sep 28, 2022
bbcde66
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Sep 28, 2022
458e832
Bump Clippy version -> 0.1.66
flip1995 Sep 28, 2022
8845f82
Auto merge of #9490 - kraktus:needless_borrow, r=Jarcho
bors Sep 28, 2022
8ba081c
Fix typo
alex-semenyuk Sep 28, 2022
314d57a
[`unnecessary_lazy_evaluations`] Do not suggest switching to early ev…
kraktus Sep 28, 2022
ed9c0e3
Auto merge of #9550 - alex-semenyuk:fix_typo, r=xFrednet
bors Sep 28, 2022
8b59fe4
Shrink `hir::def::Res`.
nnethercote Sep 16, 2022
5e8a4b6
Auto merge of #9551 - kraktus:unnecessary_lazy_evaluations, r=xFrednet
bors Sep 29, 2022
5797911
Bump nightly version -> 2022-09-29
flip1995 Sep 28, 2022
67af127
Fix dogfood
flip1995 Sep 28, 2022
924c1ce
Update lints after sync
flip1995 Sep 28, 2022
e43f5a1
Auto merge of #9516 - flip1995:rustup, r=flip1995
bors Sep 29, 2022
6ec7759
[`unnecessary_lazy_eval`] Do not lint in external macros
kraktus Sep 29, 2022
416da12
[`redundant_closure`] Add `&mut` to more cases
evantypanski Sep 29, 2022
68408c5
Auto merge of #9486 - kraktus:lazy_eval, r=dswij
bors Sep 30, 2022
47a7d68
doc: make the usage of clippy.toml more clear
xxchan Sep 30, 2022
5f25f7e
Auto merge of #9557 - xxchan:xxchan/safe-anaconda, r=Manishearth
bors Sep 30, 2022
85b8ff7
Fix style in `if let` chain
evantypanski Sep 30, 2022
dbadf37
Add test case where `FnMut` used once needs `&mut`
Sep 30, 2022
a78551b
Auto merge of #9556 - evantypanski:et/issue-9369, r=Alexendoo
bors Sep 30, 2022
4876882
Fix #9544
c410-f3r Sep 30, 2022
31b1741
Auto merge of #9510 - Alexendoo:lintcheck-server2, r=matthiaskrgr
bors Sep 30, 2022
0867c64
clippy: adopt to the new lint API
WaffleLapkin Sep 16, 2022
8dfbad9
bless clippy
WaffleLapkin Sep 22, 2022
9e8f53d
Auto merge of #101986 - WaffleLapkin:move_lint_note_to_the_bottom, r=…
bors Oct 1, 2022
3757a0e
avoid doc-link-with-quotes in code blocks
llogiq Oct 1, 2022
418b30b
rustc_tool_utils bump version in anticipation of a new release
matthiaskrgr Sep 30, 2022
8030ee9
Auto merge of #9568 - matthiaskrgr:tools_util_bump, r=flip1995
bors Oct 1, 2022
8da2429
Auto merge of #9567 - rust-lang:doc-link-with-code, r=Alexendoo
bors Oct 1, 2022
ce609c6
use rustc_tools_util dependency from crates.io instead of this repo.
matthiaskrgr Oct 1, 2022
eef5d47
use `is_integer_literal` more
llogiq Oct 1, 2022
9b6b452
Auto merge of #9569 - matthiaskrgr:rtu_from_cratesio, r=xFrednet
bors Oct 1, 2022
b221184
Implement manual_clamp lint
Xaeroxe Sep 16, 2022
64243c6
Auto merge of #9484 - Xaeroxe:clamping-without-clamp, r=Alexendoo
bors Oct 1, 2022
5a54db1
Remove unused .fixed files
Alexendoo Oct 1, 2022
a834ac9
Only run x86 asm doctests on x86
Alexendoo Oct 1, 2022
52a68dc
lint nested patterns and slice patterns in `needless_borrowed_reference`
Alexendoo Oct 1, 2022
cb8da67
Auto merge of #9509 - schubart:fix_sorting, r=llogiq
bors Oct 2, 2022
5d837b5
Auto merge of #9573 - Alexendoo:needless-borrowed-ref-slice, r=dswij
bors Oct 2, 2022
90b446f
[`unnecessary_cast`] add parenthesis when negative number uses a method
kraktus Oct 2, 2022
2c04c1a
[`manual_assert`]: Preserve comments in the suggestion
kraktus Sep 14, 2022
a35734c
revert `manual_assert` suggestion refactor
kraktus Sep 16, 2022
22be60b
fix indentation
kraktus Oct 2, 2022
d6d5ecd
Auto merge of #9571 - rust-lang:refactor-lit-ints, r=Jarcho
bors Oct 2, 2022
3ab02aa
fix tests
kraktus Oct 2, 2022
ac12011
Auto merge of #9577 - kraktus:unnecessary_cast, r=llogiq
bors Oct 2, 2022
081f739
let unnecessary_cast work for trivial non_literal expressions
TennyZhuang Oct 2, 2022
f204398
ignore the lint on some test files
TennyZhuang Oct 2, 2022
bff811b
extract common codes
TennyZhuang Oct 2, 2022
c9b9314
fix some logics
TennyZhuang Oct 2, 2022
11a6d19
Auto merge of #9479 - kraktus:manual_assert2, r=llogiq
bors Oct 2, 2022
f8ba192
Auto merge of #9576 - TennyZhuang:unnecessary_cast_for_non_literal_ex…
bors Oct 2, 2022
8e7af6b
Replace `is_lang_ctor` with `is_res_lang_ctor`
Jarcho Jun 29, 2022
162aa19
Fix and improve internal lint checking for `match_type` usages
Jarcho Nov 11, 2021
0341198
Auto merge of #9574 - Alexendoo:unused-fixed, r=Jarcho
bors Oct 2, 2022
eb39702
fallout: fix tests to allow uninlined_format_args
nyurik Oct 2, 2022
bef93d3
Auto merge of #7962 - Jarcho:fix_match_type_on_diagnostic_items, r=ll…
bors Oct 2, 2022
649d443
Replace `expr_visitor` with `for_each_expr`
Jarcho Apr 28, 2022
38236a7
Use `for_each_expr` in place of some visitors
Jarcho Apr 29, 2022
26bb366
Workaround rustc bug
Jarcho Oct 2, 2022
2be6c4a
Auto merge of #8762 - Jarcho:visitor, r=Jarcho
bors Oct 3, 2022
bf18768
let upper_case_acronyms check the enum name
TennyZhuang Oct 3, 2022
7747032
`suboptimal_flops` lint for multiply and subtract
ebobrow Oct 3, 2022
15431b3
Merge branch 'master' into mul-add-negative
ebobrow Oct 3, 2022
18e10ca
Auto merge of #9580 - TennyZhuang:upper_case_acronyms-enum, r=llogiq
bors Oct 3, 2022
f1c831a
add `implicit_saturating_add` lint
roynrishingha Sep 28, 2022
09e6c23
Auto merge of #9549 - royrustdev:manual_saturating_add, r=llogiq
bors Oct 3, 2022
5825ae7
Auto merge of #9581 - ebobrow:mul-add-negative, r=Manishearth
bors Oct 3, 2022
99363fe
Address comments
c410-f3r Oct 3, 2022
e8c1b54
Auto merge of #9559 - c410-f3r:arith, r=Alexendoo
bors Oct 3, 2022
2a6a98f
[arithmetic-side-effects] Do not ignore literal references
c410-f3r Oct 3, 2022
a44914f
Dogfood
c410-f3r Oct 3, 2022
2f90b2a
Auto merge of #9547 - nyurik:capt, r=flip1995
bors Oct 4, 2022
425e1ea
Auto merge of #9587 - c410-f3r:arith, r=Alexendoo
bors Oct 4, 2022
da16cc1
It's not about types or consts, but the lack of regions
oli-obk Oct 4, 2022
14f9f2b
lint::unsafe_removed_from_name: fix false positive result when allowed
Andy-Python-Programmer Oct 5, 2022
86c86c3
Add `disallowed_macros` lint
Alexendoo Oct 5, 2022
e687bed
Auto merge of #9495 - Alexendoo:disallowed-macros, r=Jarcho
bors Oct 5, 2022
9226066
FormatArgsExpn: Find comma spans and ignore weird proc macro spans
Alexendoo Oct 5, 2022
887ba0c
Auto merge of #9586 - Alexendoo:format-args-commas, r=Manishearth
bors Oct 5, 2022
e2808af
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Oct 6, 2022
ad1814d
Bump nightly version -> 2022-10-06
flip1995 Oct 6, 2022
ac0e10a
Auto merge of #9596 - flip1995:rustup, r=flip1995
bors Oct 6, 2022
27f2f0a
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
flip1995 Oct 6, 2022
db490d0
Update Cargo.lock
flip1995 Oct 6, 2022
c251f8d
lint: fix a few comments
nyurik Oct 6, 2022
45343e2
Auto merge of #9598 - nyurik:fix-comment, r=Alexendoo
bors Oct 6, 2022
cfd6c8d
Add a temporary workaround for multiline formart arg inlining
nyurik Oct 6, 2022
6dd0c3a
Auto merge of #9599 - nyurik:inline-crash, r=flip1995
bors Oct 6, 2022
8f1ebdd
Auto merge of #9593 - Andy-Python-Programmer:master, r=llogiq
bors Oct 6, 2022
2b30ce0
Merge commit '8f1ebdd18bdecc621f16baaf779898cc08cc2766' into clippyup
flip1995 Oct 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 7 additions & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ dependencies = [
"directories",
"rustc-build-sysroot",
"rustc-workspace-hack",
"rustc_tools_util 0.2.1",
"rustc_tools_util",
"rustc_version",
"serde",
"serde_json",
Expand Down Expand Up @@ -655,7 +655,7 @@ dependencies = [

[[package]]
name = "clippy"
version = "0.1.65"
version = "0.1.66"
dependencies = [
"clippy_lints",
"clippy_utils",
Expand All @@ -670,7 +670,7 @@ dependencies = [
"regex",
"rustc-semver",
"rustc-workspace-hack",
"rustc_tools_util 0.2.0",
"rustc_tools_util",
"semver",
"serde",
"syn",
Expand Down Expand Up @@ -698,7 +698,7 @@ dependencies = [

[[package]]
name = "clippy_lints"
version = "0.1.65"
version = "0.1.66"
dependencies = [
"cargo_metadata 0.14.0",
"clippy_utils",
Expand All @@ -720,7 +720,7 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.65"
version = "0.1.66"
dependencies = [
"arrayvec",
"if_chain",
Expand Down Expand Up @@ -829,9 +829,9 @@ dependencies = [

[[package]]
name = "compiletest_rs"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "262134ef87408da1ddfe45e33daa0ca43b75286d6b1076446e602d264cf9847e"
checksum = "70489bbb718aea4f92e5f48f2e3b5be670c2051de30e57cb6e5377b4aa08b372"
dependencies = [
"diff",
"filetime",
Expand Down Expand Up @@ -4162,10 +4162,6 @@ dependencies = [
"tracing",
]

[[package]]
name = "rustc_tools_util"
version = "0.2.0"

[[package]]
name = "rustc_tools_util"
version = "0.2.1"
Expand Down
159 changes: 157 additions & 2 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,161 @@ document.

## Unreleased / In Rust Nightly

[d7b5cbf0...master](https://github.com/rust-lang/rust-clippy/compare/d7b5cbf0...master)
[3c7e7dbc...master](https://github.com/rust-lang/rust-clippy/compare/3c7e7dbc...master)

## Rust 1.64

Current stable, released 2022-09-22

[d7b5cbf0...3c7e7dbc](https://github.com/rust-lang/rust-clippy/compare/d7b5cbf0...3c7e7dbc)

### New Lints

* [`arithmetic_side_effects`]
[#9130](https://github.com/rust-lang/rust-clippy/pull/9130)
* [`invalid_utf8_in_unchecked`]
[#9105](https://github.com/rust-lang/rust-clippy/pull/9105)
* [`assertions_on_result_states`]
[#9225](https://github.com/rust-lang/rust-clippy/pull/9225)
* [`manual_find`]
[#8649](https://github.com/rust-lang/rust-clippy/pull/8649)
* [`manual_retain`]
[#8972](https://github.com/rust-lang/rust-clippy/pull/8972)
* [`default_instead_of_iter_empty`]
[#8989](https://github.com/rust-lang/rust-clippy/pull/8989)
* [`manual_rem_euclid`]
[#9031](https://github.com/rust-lang/rust-clippy/pull/9031)
* [`obfuscated_if_else`]
[#9148](https://github.com/rust-lang/rust-clippy/pull/9148)
* [`std_instead_of_core`]
[#9103](https://github.com/rust-lang/rust-clippy/pull/9103)
* [`std_instead_of_alloc`]
[#9103](https://github.com/rust-lang/rust-clippy/pull/9103)
* [`alloc_instead_of_core`]
[#9103](https://github.com/rust-lang/rust-clippy/pull/9103)
* [`explicit_auto_deref`]
[#8355](https://github.com/rust-lang/rust-clippy/pull/8355)


### Moves and Deprecations

* Moved [`format_push_string`] to `restriction` (now allow-by-default)
[#9161](https://github.com/rust-lang/rust-clippy/pull/9161)

### Enhancements

* [`significant_drop_in_scrutinee`]: Now gives more context in the lint message
[#8981](https://github.com/rust-lang/rust-clippy/pull/8981)
* [`single_match`], [`single_match_else`]: Now catches more `Option` cases
[#8985](https://github.com/rust-lang/rust-clippy/pull/8985)
* [`unused_async`]: Now works for async methods
[#9025](https://github.com/rust-lang/rust-clippy/pull/9025)
* [`manual_filter_map`], [`manual_find_map`]: Now lint more expressions
[#8958](https://github.com/rust-lang/rust-clippy/pull/8958)
* [`question_mark`]: Now works for simple `if let` expressions
[#8356](https://github.com/rust-lang/rust-clippy/pull/8356)
* [`undocumented_unsafe_blocks`]: Now finds comments before the start of closures
[#9117](https://github.com/rust-lang/rust-clippy/pull/9117)
* [`trait_duplication_in_bounds`]: Now catches duplicate bounds in where clauses
[#8703](https://github.com/rust-lang/rust-clippy/pull/8703)
* [`shadow_reuse`], [`shadow_same`], [`shadow_unrelated`]: Now lint in const blocks
[#9124](https://github.com/rust-lang/rust-clippy/pull/9124)
* [`slow_vector_initialization`]: Now detects cases with `vec.capacity()`
[#8953](https://github.com/rust-lang/rust-clippy/pull/8953)
* [`unused_self`]: Now respects the `avoid-breaking-exported-api` config option
[#9199](https://github.com/rust-lang/rust-clippy/pull/9199)
* [`box_collection`]: Now supports all std collections
[#9170](https://github.com/rust-lang/rust-clippy/pull/9170)

### False Positive Fixes

* [`significant_drop_in_scrutinee`]: Now ignores calls to `IntoIterator::into_iter`
[#9140](https://github.com/rust-lang/rust-clippy/pull/9140)
* [`while_let_loop`]: Now ignores cases when the significant drop order would change
[#8981](https://github.com/rust-lang/rust-clippy/pull/8981)
* [`branches_sharing_code`]: Now ignores cases where moved variables have a significant
drop or variable modifications can affect the conditions
[#9138](https://github.com/rust-lang/rust-clippy/pull/9138)
* [`let_underscore_lock`]: Now ignores bindings that aren't locked
[#8990](https://github.com/rust-lang/rust-clippy/pull/8990)
* [`trivially_copy_pass_by_ref`]: Now tracks lifetimes and ignores cases where unsafe
pointers are used
[#8639](https://github.com/rust-lang/rust-clippy/pull/8639)
* [`let_unit_value`]: No longer ignores `#[allow]` attributes on the value
[#9082](https://github.com/rust-lang/rust-clippy/pull/9082)
* [`declare_interior_mutable_const`]: Now ignores the `thread_local!` macro
[#9015](https://github.com/rust-lang/rust-clippy/pull/9015)
* [`if_same_then_else`]: Now ignores branches with `todo!` and `unimplemented!`
[#9006](https://github.com/rust-lang/rust-clippy/pull/9006)
* [`enum_variant_names`]: Now ignores names with `_` prefixes
[#9032](https://github.com/rust-lang/rust-clippy/pull/9032)
* [`let_unit_value`]: Now ignores cases, where the unit type is manually specified
[#9056](https://github.com/rust-lang/rust-clippy/pull/9056)
* [`match_same_arms`]: Now ignores branches with `todo!`
[#9207](https://github.com/rust-lang/rust-clippy/pull/9207)
* [`assign_op_pattern`]: Ignores cases that break borrowing rules
[#9214](https://github.com/rust-lang/rust-clippy/pull/9214)
* [`extra_unused_lifetimes`]: No longer triggers in derive macros
[#9037](https://github.com/rust-lang/rust-clippy/pull/9037)
* [`mismatching_type_param_order`]: Now ignores complicated generic parameters
[#9146](https://github.com/rust-lang/rust-clippy/pull/9146)
* [`equatable_if_let`]: No longer lints in macros
[#9074](https://github.com/rust-lang/rust-clippy/pull/9074)
* [`new_without_default`]: Now ignores generics and lifetime parameters on `fn new`
[#9115](https://github.com/rust-lang/rust-clippy/pull/9115)
* [`needless_borrow`]: Now ignores cases that result in the execution of different traits
[#9096](https://github.com/rust-lang/rust-clippy/pull/9096)
* [`declare_interior_mutable_const`]: No longer triggers in thread-local initializers
[#9246](https://github.com/rust-lang/rust-clippy/pull/9246)

### Suggestion Fixes/Improvements

* [`type_repetition_in_bounds`]: The suggestion now works with maybe bounds
[#9132](https://github.com/rust-lang/rust-clippy/pull/9132)
* [`transmute_ptr_to_ref`]: Now suggests `pointer::cast` when possible
[#8939](https://github.com/rust-lang/rust-clippy/pull/8939)
* [`useless_format`]: Now suggests the correct variable name
[#9237](https://github.com/rust-lang/rust-clippy/pull/9237)
* [`or_fun_call`]: The lint emission will now only span over the `unwrap_or` call
[#9144](https://github.com/rust-lang/rust-clippy/pull/9144)
* [`neg_multiply`]: Now suggests adding parentheses around suggestion if needed
[#9026](https://github.com/rust-lang/rust-clippy/pull/9026)
* [`unnecessary_lazy_evaluations`]: Now suggest for `bool::then_some` for lazy evaluation
[#9099](https://github.com/rust-lang/rust-clippy/pull/9099)
* [`manual_flatten`]: Improved message for long code snippets
[#9156](https://github.com/rust-lang/rust-clippy/pull/9156)
* [`explicit_counter_loop`]: The suggestion is now machine applicable
[#9149](https://github.com/rust-lang/rust-clippy/pull/9149)
* [`needless_borrow`]: Now keeps parentheses around fields, when needed
[#9210](https://github.com/rust-lang/rust-clippy/pull/9210)
* [`while_let_on_iterator`]: The suggestion now works in `FnOnce` closures
[#9134](https://github.com/rust-lang/rust-clippy/pull/9134)

### ICE Fixes

* Fix ICEs related to `#![feature(generic_const_exprs)]` usage
[#9241](https://github.com/rust-lang/rust-clippy/pull/9241)
* Fix ICEs related to reference lints
[#9093](https://github.com/rust-lang/rust-clippy/pull/9093)
* [`question_mark`]: Fix ICE on zero field tuple structs
[#9244](https://github.com/rust-lang/rust-clippy/pull/9244)

### Documentation Improvements

* [`needless_option_take`]: Now includes a "What it does" and "Why is this bad?" section.
[#9022](https://github.com/rust-lang/rust-clippy/pull/9022)

### Others

* Using `--cap-lints=allow` and only `--force-warn`ing some will now work with Clippy's driver
[#9036](https://github.com/rust-lang/rust-clippy/pull/9036)
* Clippy now tries to read the `rust-version` from `Cargo.toml` to identify the
minimum supported rust version
[#8774](https://github.com/rust-lang/rust-clippy/pull/8774)

## Rust 1.63

Current stable, released 2022-08-11
Released 2022-08-11

[7c21f91b...d7b5cbf0](https://github.com/rust-lang/rust-clippy/compare/7c21f91b...d7b5cbf0)

Expand Down Expand Up @@ -3609,6 +3759,7 @@ Released 2018-09-13
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
[`box_collection`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_collection
[`box_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_default
[`box_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_vec
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
[`branches_sharing_code`]: https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
Expand Down Expand Up @@ -3669,6 +3820,7 @@ 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
[`derive_partial_eq_without_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
[`disallowed_macros`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
[`disallowed_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_method
[`disallowed_methods`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
[`disallowed_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
Expand Down Expand Up @@ -3766,6 +3918,7 @@ Released 2018-09-13
[`implicit_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
[`implicit_hasher`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
[`implicit_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
[`implicit_saturating_add`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_add
[`implicit_saturating_sub`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub
[`imprecise_flops`]: https://rust-lang.github.io/rust-clippy/master/index.html#imprecise_flops
[`inconsistent_digit_grouping`]: https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
Expand Down Expand Up @@ -3834,6 +3987,7 @@ Released 2018-09-13
[`manual_assert`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
[`manual_clamp`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
[`manual_find`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
Expand Down Expand Up @@ -4124,6 +4278,7 @@ Released 2018-09-13
[`unimplemented`]: https://rust-lang.github.io/rust-clippy/master/index.html#unimplemented
[`uninit_assumed_init`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_assumed_init
[`uninit_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec
[`uninlined_format_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
[`unit_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
[`unit_cmp`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_cmp
[`unit_hash`]: https://rust-lang.github.io/rust-clippy/master/index.html#unit_hash
Expand Down
8 changes: 4 additions & 4 deletions 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.65"
version = "0.1.66"
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
readme = "README.md"
Expand All @@ -23,12 +23,12 @@ path = "src/driver.rs"
[dependencies]
clippy_lints = { path = "clippy_lints" }
semver = "1.0"
rustc_tools_util = { path = "rustc_tools_util" }
rustc_tools_util = "0.2.1"
tempfile = { version = "3.2", optional = true }
termize = "0.1"

[dev-dependencies]
compiletest_rs = { version = "0.8", features = ["tmp"] }
compiletest_rs = { version = "0.9", features = ["tmp"] }
tester = "0.9"
regex = "1.5"
toml = "0.5"
Expand All @@ -55,7 +55,7 @@ tokio = { version = "1", features = ["io-util"] }
rustc-semver = "1.1"

[build-dependencies]
rustc_tools_util = { version = "0.2", path = "rustc_tools_util" }
rustc_tools_util = "0.2.1"

[features]
deny-warnings = ["clippy_lints/deny-warnings"]
Expand Down
46 changes: 27 additions & 19 deletions src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,25 +139,6 @@ line. (You can swap `clippy::all` with the specific lint category you are target

## Configuration

Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`. It contains a basic `variable =
value` mapping e.g.

```toml
avoid-breaking-exported-api = false
disallowed-names = ["toto", "tata", "titi"]
cognitive-complexity-threshold = 30
```

See the [list of lints](https://rust-lang.github.io/rust-clippy/master/index.html) for more information about which
lints can be configured and the meaning of the variables.

Note that configuration changes will not apply for code that has already been compiled and cached under `./target/`;
for example, adding a new string to `doc-valid-idents` may still result in Clippy flagging that string. To be sure that
any configuration changes are applied, you may want to run `cargo clean` and re-compile your crate from scratch.

To deactivate the “for further information visit *lint-link*” message you can
define the `CLIPPY_DISABLE_DOCS_LINKS` environment variable.

### Allowing/denying lints

You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
Expand Down Expand Up @@ -205,6 +186,33 @@ the lint(s) you are interested in:
cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
```

### Configure the behavior of some lints

Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`. It contains a basic `variable =
value` mapping e.g.

```toml
avoid-breaking-exported-api = false
disallowed-names = ["toto", "tata", "titi"]
cognitive-complexity-threshold = 30
```

See the [list of lints](https://rust-lang.github.io/rust-clippy/master/index.html) for more information about which
lints can be configured and the meaning of the variables.

> **Note**
>
> `clippy.toml` or `.clippy.toml` cannot be used to allow/deny lints.
> **Note**
>
> Configuration changes will not apply for code that has already been compiled and cached under `./target/`;
> for example, adding a new string to `doc-valid-idents` may still result in Clippy flagging that string. To be sure
> that any configuration changes are applied, you may want to run `cargo clean` and re-compile your crate from scratch.
To deactivate the “for further information visit *lint-link*” message you can
define the `CLIPPY_DISABLE_DOCS_LINKS` environment variable.

### Specifying the minimum supported Rust version

Projects that intend to support old versions of Rust can disable lints pertaining to newer features by
Expand Down
6 changes: 3 additions & 3 deletions src/tools/clippy/clippy_dev/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ pub fn run(check: bool, verbose: bool) {
fn output_err(err: CliError) {
match err {
CliError::CommandFailed(command, stderr) => {
eprintln!("error: A command failed! `{}`\nstderr: {}", command, stderr);
eprintln!("error: A command failed! `{command}`\nstderr: {stderr}");
},
CliError::IoError(err) => {
eprintln!("error: {}", err);
eprintln!("error: {err}");
},
CliError::RustfmtNotInstalled => {
eprintln!("error: rustfmt nightly is not installed.");
},
CliError::WalkDirError(err) => {
eprintln!("error: {}", err);
eprintln!("error: {err}");
},
CliError::IntellijSetupActive => {
eprintln!(
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_dev/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn main() {
matches.contains_id("msrv"),
) {
Ok(_) => update_lints::update(update_lints::UpdateMode::Change),
Err(e) => eprintln!("Unable to create lint: {}", e),
Err(e) => eprintln!("Unable to create lint: {e}"),
}
},
Some(("setup", sub_command)) => match sub_command.subcommand() {
Expand Down
Loading