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 #111799

Merged
merged 117 commits into from
May 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
a408e76
Suggest the correct variable name for `manual_let_else`
koka831 Feb 1, 2023
4931f45
Split if conditions by its semantics
koka831 Feb 1, 2023
20338fd
Remove old feature flag in code comment
koka831 Feb 1, 2023
07c8c50
Avoid renaming for TupleStruct with multiple arguments
koka831 Feb 1, 2023
5fc1c79
bump up `regex-syntax` dependency version to 0.7.0
J-ZhengLi Apr 22, 2023
cc607fe
don't remove `dbg!` in arbitrary expressions
y21 Apr 29, 2023
478555d
wip
john-h-k Apr 30, 2023
1eff408
WIP
john-h-k Apr 30, 2023
0fb3f3b
WIP
john-h-k Apr 30, 2023
8db21e9
WIP
john-h-k Apr 30, 2023
b9788fe
Working
john-h-k Apr 30, 2023
a233bd5
Make the BUG_REPORT_URL configurable by tools
jyn514 Apr 29, 2023
37127b8
initial step towards implementing C string literals
fee1-dead Mar 5, 2023
f7595e0
rm diag item, use lang item
fee1-dead Mar 6, 2023
cbd0135
Update trait_bounds.rs
john-h-k May 2, 2023
122793b
Update trait_bounds.rs
john-h-k May 2, 2023
477c8b3
Bump README copyright
alnoki May 3, 2023
2bc479a
IAT: Introduce AliasKind::Inherent
fmease Mar 21, 2023
a48c735
Rollup merge of #108801 - fee1-dead-contrib:c-str, r=compiler-errors
Dylan-DPC May 5, 2023
7e9abb3
Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup
flip1995 May 5, 2023
68eb864
Ignore expressions from macros in default_constructed_unit_structs
Alexendoo May 5, 2023
afa2741
redundant_pattern_matching
disco07 May 5, 2023
d2bbe76
redundant_pattern_matching
disco07 May 5, 2023
d80ca09
Fix: Some suggestions generated by the option_if_let_else lint did no…
EliasHolzmann Feb 12, 2023
5889ecd
Auto merge of #111255 - flip1995:clippyup, r=Manishearth
bors May 5, 2023
2a4571d
Minimizing changes
blyxyas May 6, 2023
0b7acaa
Rollup merge of #110989 - jyn514:bug-report-url, r=WaffleLapkin
matthiaskrgr May 6, 2023
f4b8cb1
Add missing word "are"
cakebaker May 6, 2023
9e535f6
fix conflict with matches macro
disco07 May 6, 2023
630f31c
fix conflict with matches macro
disco07 May 7, 2023
450a22f
fix error test
disco07 May 7, 2023
39db64e
make (try_)subst_and_normalize_erasing_regions take EarlyBinder
kylematsuda Feb 20, 2023
3fc1155
changes from review: add FIXME to clippy and change subst_identity to…
kylematsuda May 7, 2023
fb6bf1e
update a func
disco07 May 7, 2023
5c8a009
Comments
john-h-k May 7, 2023
394b4c1
Ignore `borrow_deref_ref` warnings in code from procedural macros.
lochetti May 7, 2023
3aab0dd
Auto merge of #10752 - Alexendoo:default-units-macros, r=giraffate
bors May 8, 2023
56e8e1a
new lint: clippy::ref_patterns
NotAPenguin0 May 8, 2023
8798c66
Auto merge of #10736 - NotAPenguin0:master, r=Alexendoo
bors May 8, 2023
e66488a
Auto merge of #10757 - cakebaker:add_missing_word, r=Jarcho
bors May 8, 2023
5491241
`Wildcard_imports` ignore `test.rs` files
blyxyas Apr 1, 2023
5acc299
Really mini minor irrelevant change for formatting
blyxyas Apr 3, 2023
ba0e7e8
Now the lint ignores any crates with `--cfg test`
blyxyas Apr 5, 2023
90ce1a2
Auto merge of #10761 - lochetti:fix_9871, r=Manishearth
bors May 8, 2023
34655df
Rollup merge of #109410 - fmease:iat-alias-kind-inherent, r=compiler-…
compiler-errors May 8, 2023
4c3e2ff
Fix header
blyxyas May 8, 2023
d696f3b
Auto merge of #10584 - blyxyas:fix-wildcard_imports_testsrs, r=flip1995
bors May 8, 2023
b4075e8
Auto merge of #10735 - alnoki:patch-1, r=dswij
bors May 8, 2023
b169bdb
Comments
john-h-k May 9, 2023
77e4d7a
Auto merge of #10727 - john-h-k:lint/dup-auto-traits, r=Manishearth
bors May 9, 2023
3e8fea6
Fix config formatting, less indenting, more spacing
blyxyas May 9, 2023
1407c76
Auto merge of #10751 - blyxyas:explain_with_config, r=xFrednet
bors May 9, 2023
342ce3d
fix reviewer comments
disco07 May 9, 2023
6af0359
Drop uplifted clippy::drop_ref
Urgau Mar 26, 2023
551f6e6
Drop uplifted clippy::drop_copy
Urgau Mar 27, 2023
22688fc
Drop uplifted clippy::forget_ref
Urgau Mar 28, 2023
35e5aac
Drop uplifted clippy::forget_copy
Urgau Mar 28, 2023
c5d4b04
needless_bool: do not simplify code if it loses comments
samueltardieu May 10, 2023
c56dd3d
Auto merge of #10766 - samueltardieu:issue-10710, r=Manishearth
bors May 10, 2023
0a4cfbf
fix: warn on empty line outer AttrKind::DocComment
jdswensen Apr 2, 2023
3991dd1
fix reviewer comments: tests results
disco07 May 11, 2023
c53ceba
update tests
disco07 May 11, 2023
a8834bc
add lint `manual_next_back`
Icxolu May 4, 2023
3d456ce
Auto merge of #10769 - Icxolu:manual_next_back, r=giraffate
bors May 12, 2023
8100a88
Update actions/checkout
giraffate May 12, 2023
035c457
Auto merge of #10771 - giraffate:update_actions_checkout, r=flip1995
bors May 12, 2023
fce41ce
Update actions/setup-node
giraffate May 12, 2023
6cbd767
Auto merge of #10772 - giraffate:update_actions_setup-node, r=flip1995
bors May 12, 2023
fff790b
Auto merge of #10691 - jdswensen:jds/fix-doc-empty-line, r=Jarcho
bors May 12, 2023
891fffe
Consider referenced allowed or hard-coded types
c410-f3r May 14, 2023
a167973
Auto merge of #10768 - c410-f3r:arith-3, r=Jarcho
bors May 14, 2023
e234dfa
Ignoring `let_underscore_untyped` warnings in code from proc macros
lochetti May 14, 2023
df200aa
fixing fmt
lochetti May 14, 2023
493b2ae
Rename integer_arithmetic
c410-f3r May 14, 2023
fcb1327
Exposes false negative in clippy's diverging_sub_expression
dtolnay May 14, 2023
84f89f3
enhance `needless_collect`
Icxolu May 13, 2023
1190c02
fix #10773
Centri3 May 14, 2023
a36d9a7
move `is_ty_alias` to `clippy_utils`
Centri3 May 14, 2023
590c9fc
Auto merge of #10778 - Centri3:type-alias-fix, r=llogiq
bors May 14, 2023
9c6350b
flip1995: Stepping down from the reviewer rotation
flip1995 May 15, 2023
c490974
Auto merge of #10781 - flip1995:stepping-down, r=xFrednet
bors May 15, 2023
79a8867
update test option
disco07 May 15, 2023
f0be0ee
handle nested macros and add tests for them
y21 May 15, 2023
79eb06c
Remove unnecessary from example
mickvangelderen May 15, 2023
2d9d81f
Checking for proc_macro not only when local.init is Some
lochetti May 16, 2023
fc12637
Remove `LangItems::require`
Noratrieb May 16, 2023
ae40b7f
fix example heading in `string_slice`
Centri3 May 16, 2023
506b50e
Rollup merge of #111648 - Nilstrieb:language-items, r=WaffleLapkin
Dylan-DPC May 17, 2023
591f5f7
Update urls in Type Checking
adrianEffe May 17, 2023
0eb364b
Exclude inherent projections from some alias ty matches
fmease May 17, 2023
7e18451
Auto merge of #10175 - koka831:fix/10171, r=giraffate
bors May 18, 2023
407c352
Auto merge of #10337 - EliasHolzmann:fix/10335, r=dswij
bors May 18, 2023
223f518
Auto merge of #10682 - J-ZhengLi:issue10680, r=dswij
bors May 18, 2023
f3f6fd8
Auto merge of #10775 - lochetti:fix_10723, r=xFrednet
bors May 18, 2023
9cd483d
Auto merge of #10786 - mickvangelderen:remove-unnecessary-clone-from-…
bors May 18, 2023
cf182b9
Auto merge of #10789 - Centri3:patch-1, r=xFrednet
bors May 18, 2023
815a07e
Auto merge of #10725 - y21:issue9914, r=Jarcho
bors May 18, 2023
270cbeb
Auto merge of #10674 - c410-f3r:macro-lint, r=Jarcho
bors May 18, 2023
22b3196
Auto merge of #10753 - disco07:master, r=xFrednet
bors May 18, 2023
cfa5aa2
Don't suggest unnameable types in box_default, let_underscore_untyped
Alexendoo May 18, 2023
392e955
Auto merge of #10798 - Alexendoo:unnameable-ty-suggestions, r=Jarcho
bors May 18, 2023
0b3c2ed
Search for inactive `cfg` attributes and empty macro expansion through
Jarcho Mar 8, 2023
5351170
Slightly refactor constant evaluation and add detection for empty mac…
Jarcho Mar 9, 2023
58132cb
Improve `SpanlessEq`
Jarcho Mar 10, 2023
1e8d2c5
Auto merge of #10478 - Jarcho:block_eq, r=xFrednet
bors May 19, 2023
2a1dbba
Auto merge of #10777 - Icxolu:unnecessary_collect, r=xFrednet
bors May 19, 2023
ab66a86
Add new `UNIQUE_CFG_CONDITION` lint
GuillaumeGomez May 9, 2023
fcf1948
Add UI test for UNIQUE_CFG_CONDITION
GuillaumeGomez May 9, 2023
5328852
Update CHANGELOG
GuillaumeGomez May 9, 2023
dbc76a7
Add check for empty cfg `all` condition
GuillaumeGomez May 19, 2023
940ffdf
Auto merge of #10763 - GuillaumeGomez:unique_cfg_condition, r=Jarcho
bors May 20, 2023
28dddc7
Auto merge of #10795 - adrianEffe:fix/TyKind-enum, r=flip1995
bors May 20, 2023
96b32b1
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 May 20, 2023
2e95a4f
Bump nightly version -> 2023-05-20
flip1995 May 20, 2023
435a8ad
Auto merge of #10802 - flip1995:rustup, r=flip1995
bors May 20, 2023
12cbb6c
Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup
flip1995 May 20, 2023
d780efc
Update Cargo.lock
flip1995 May 20, 2023
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
12 changes: 9 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ dependencies = [
"itertools",
"pulldown-cmark",
"quine-mc_cluskey",
"regex-syntax",
"regex-syntax 0.7.1",
"rustc-semver",
"semver",
"serde",
Expand Down Expand Up @@ -2866,7 +2866,7 @@ checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
"regex-syntax 0.6.26",
]

[[package]]
Expand All @@ -2875,7 +2875,7 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax",
"regex-syntax 0.6.26",
]

[[package]]
Expand All @@ -2893,6 +2893,12 @@ version = "0.6.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"

[[package]]
name = "regex-syntax"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"

[[package]]
name = "remote-test-client"
version = "0.1.0"
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 @@ -39,7 +39,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Install toolchain
run: rustup show active-toolchain
Expand Down
10 changes: 5 additions & 5 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}

Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Install toolchain
run: rustup show active-toolchain
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Install toolchain
run: rustup show active-toolchain
Expand All @@ -173,7 +173,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Install toolchain
run: rustup show active-toolchain
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
github_token: "${{ secrets.github_token }}"

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Install toolchain
run: rustup show active-toolchain
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/workflows/clippy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

# Run
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3
with:
ref: ${{ env.TARGET_BRANCH }}
path: 'out'
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/.github/workflows/remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v1.4.4
uses: actions/setup-node@v3
with:
node-version: '14.x'

Expand Down
4 changes: 4 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4620,6 +4620,7 @@ Released 2018-09-13
[`else_if_without_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#else_if_without_else
[`empty_drop`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_drop
[`empty_enum`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_enum
[`empty_line_after_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
[`empty_line_after_outer_attr`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
[`empty_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
[`empty_structs_with_brackets`]: https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
Expand Down Expand Up @@ -4785,6 +4786,7 @@ Released 2018-09-13
[`manual_main_separator_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_main_separator_str
[`manual_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
[`manual_next_back`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
[`manual_range_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
Expand Down Expand Up @@ -4897,6 +4899,7 @@ Released 2018-09-13
[`no_effect_underscore_binding`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
[`no_mangle_with_rust_abi`]: https://rust-lang.github.io/rust-clippy/master/index.html#no_mangle_with_rust_abi
[`non_ascii_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
[`non_minimal_cfg`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg
[`non_octal_unix_permissions`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_octal_unix_permissions
[`non_send_fields_in_send_ty`]: https://rust-lang.github.io/rust-clippy/master/index.html#non_send_fields_in_send_ty
[`nonminimal_bool`]: https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
Expand Down Expand Up @@ -4978,6 +4981,7 @@ Released 2018-09-13
[`ref_binding_to_reference`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_binding_to_reference
[`ref_in_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_in_deref
[`ref_option_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
[`ref_patterns`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_patterns
[`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro
[`repeat_once`]: https://rust-lang.github.io/rust-clippy/master/index.html#repeat_once
[`replace_consts`]: https://rust-lang.github.io/rust-clippy/master/index.html#replace_consts
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ If you want to contribute to Clippy, you can find more information in [CONTRIBUT

<!-- REUSE-IgnoreStart -->

Copyright 2014-2022 The Rust Project Developers
Copyright 2014-2023 The Rust Project Developers

Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)> or the MIT license
Expand Down
6 changes: 3 additions & 3 deletions src/tools/clippy/book/src/development/type_checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ in this chapter:
- [Type checking](https://rustc-dev-guide.rust-lang.org/type-checking.html)
- [Ty module](https://rustc-dev-guide.rust-lang.org/ty.html)

[Adt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.TyKind.html#variant.Adt
[Adt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html#variant.Adt
[AdtDef]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/adt/struct.AdtDef.html
[expr_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#method.expr_ty
[node_type]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#method.node_type
Expand All @@ -142,9 +142,9 @@ in this chapter:
[kind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html#method.kind
[LateContext]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/struct.LateContext.html
[LateLintPass]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
[pat_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TypeckResults.html#method.pat_ty
[pat_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/typeck_results/struct.TypeckResults.html#method.pat_ty
[Ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Ty.html
[TyKind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.TyKind.html
[TyKind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_type_ir/sty/enum.TyKind.html
[TypeckResults]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html
[middle_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_middle/ty/struct.Ty.html
[hir_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir/struct.Ty.html
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if_chain = "1.0"
itertools = "0.10.1"
pulldown-cmark = { version = "0.9", default-features = false }
quine-mc_cluskey = "0.2"
regex-syntax = "0.6"
regex-syntax = "0.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
tempfile = { version = "3.2", optional = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
_ => return,
};
let Some((condition, panic_expn)) = find_assert_args(cx, e, macro_call.expn) else { return };
let Some((Constant::Bool(val), _)) = constant(cx, cx.typeck_results(), condition) else { return };
let Some(Constant::Bool(val)) = constant(cx, cx.typeck_results(), condition) else { return };
if val {
span_lint_and_help(
cx,
Expand Down
Loading