]>
git.lizzy.rs Git - rust.git/log
Tomasz Miąsko [Tue, 5 Jul 2022 00:00:00 +0000 (00:00 +0000)]
Move `predecessors` from Body to BasicBlocks
bors [Thu, 7 Jul 2022 04:18:47 +0000 (04:18 +0000)]
Auto merge of #98827 - aDotInTheVoid:suggest-extern-block, r=nagisa
Suggest using block for `extern "abi" fn` with no body
`@rustbot` modify labels: +A-diagnostics
bors [Wed, 6 Jul 2022 21:26:46 +0000 (21:26 +0000)]
Auto merge of #9096 - Jarcho:needless_borrow_subs, r=Manishearth
Fix `needless_borrow` 9095
fixes #9095
changelog: Don't lint `needless_borrow` on method receivers when it would change which trait impl is called
xFrednet [Sat, 25 Jun 2022 22:00:47 +0000 (00:00 +0200)]
Fix `#[expect]` and `#[allow]` for `clippy::duplicate_mod`
Takayuki Maeda [Wed, 6 Jul 2022 01:47:29 +0000 (10:47 +0900)]
fix miri-opt tests
bors [Wed, 6 Jul 2022 09:20:55 +0000 (09:20 +0000)]
Auto merge of #9099 - joshtriplett:unnecessary-lazy-eval-then-some, r=flip1995
Extend unnecessary_lazy_eval to cover `bool::then` -> `bool::then_some`
fixes #9097
changelog: Extend `unnecessary_lazy_eval` to convert `bool::then` to `bool::then_some`
Josh Triplett [Wed, 6 Jul 2022 07:52:53 +0000 (00:52 -0700)]
Dogfood fixes to use `bool::then_some`
flip1995 [Sun, 3 Jul 2022 15:35:24 +0000 (17:35 +0200)]
Build the Clippy book as part of x.py doc
Josh Triplett [Wed, 6 Jul 2022 07:51:40 +0000 (00:51 -0700)]
Add MSRV check for `bool::then_some`
Josh Triplett [Sat, 2 Jul 2022 22:00:24 +0000 (15:00 -0700)]
Extend unnecessary_lazy_eval to cover `bool::then` -> `bool::then_some`
Alan Egerton [Fri, 17 Jun 2022 12:15:00 +0000 (13:15 +0100)]
Update TypeVisitor paths
Alan Egerton [Fri, 17 Jun 2022 12:10:07 +0000 (13:10 +0100)]
Relax constrained generics to TypeVisitable
bors [Tue, 5 Jul 2022 20:04:14 +0000 (20:04 +0000)]
Auto merge of #9124 - Jarcho:shadow_ice, r=Alexendoo
Lint `shadow_*` lints in anon const blocks
changelog: Lint `shadow_*` lints in anon const blocks
Jason Newcomb [Tue, 5 Jul 2022 19:21:27 +0000 (15:21 -0400)]
Lint `shadow_*` lints in anon const blocks
bors [Tue, 5 Jul 2022 08:57:12 +0000 (08:57 +0000)]
Auto merge of #9121 - alex-semenyuk:fix_ui_test_cast_32_bits, r=flip1995
Fix stderr for cast_size_32bit
changelog: fix stderr for cast_size_32bit
alexey semenyuk [Tue, 5 Jul 2022 06:43:29 +0000 (09:43 +0300)]
Fix stderr for cast_size_32bit
bors [Tue, 5 Jul 2022 00:20:33 +0000 (00:20 +0000)]
Auto merge of #9117 - Jarcho:unsafe_block_closure, r=giraffate
Fix `undocumented_unsafe_blocks` in closures
fixes #9114
changelog: Fix `undocumented_unsafe_blocks` not checking for comments before the start of a closure
bors [Mon, 4 Jul 2022 18:19:37 +0000 (18:19 +0000)]
Auto merge of #9115 - Alexendoo:new-with-const-generics, r=llogiq
`new_without_default`: ignore const generics/lifetime params on `fn new`
Fixes #9113
No longer lints if `fn new` has any params
changelog: [`new_without_default`]: no longer lints const generics and lifetime params on `fn new`
Jason Newcomb [Mon, 4 Jul 2022 17:53:42 +0000 (13:53 -0400)]
Fix `undocumented_unsafe_blocks` in closures
Alex Macleod [Mon, 4 Jul 2022 14:03:11 +0000 (14:03 +0000)]
new_without_default: ignore const generics/lifetime params on fn new
bors [Mon, 4 Jul 2022 00:22:17 +0000 (00:22 +0000)]
Auto merge of #9093 - Jarcho:deref_ice, r=giraffate
Fix ICE in `dereference.rs`
fixes #9089
changelog: Fix ICE when dereferencing or borrowing on explicit returns from closures
bors [Sun, 3 Jul 2022 20:02:38 +0000 (20:02 +0000)]
Auto merge of #9105 - Serial-ATA:lint-invalid-utf8, r=Jarcho
Add `invalid_utf8_in_unchecked`
changelog: Add [`invalid_utf8_in_unchecked`]
closes: #629
Don't know how useful of a lint this is, just saw this was a really old issue :smile:.
Serial [Sun, 3 Jul 2022 02:24:26 +0000 (22:24 -0400)]
Add `invalid_utf8_in_unchecked`
bors [Sun, 3 Jul 2022 19:33:01 +0000 (19:33 +0000)]
Auto merge of #9110 - alex-semenyuk:fix_trailling_commas, r=xFrednet
Remove trailing spaces
Closes #9108
changelog: remove trailing spaces, which are not allowed by the JSON standard.
alexey semenyuk [Sun, 3 Jul 2022 19:03:51 +0000 (19:03 +0000)]
Fixed comment
bors [Sun, 3 Jul 2022 18:41:54 +0000 (18:41 +0000)]
Auto merge of #9112 - xFrednet:9088-fix-lint-versions, r=Jarcho
Correct `[clippy::version]` for 1.62 lints and add note to docs
closes: https://github.com/rust-lang/rust-clippy/issues/9088
changelog: none
---
It feels weird to have such a short PR description. So, what should I add to this one... Yes, art:
```txt
,-----.,--.,--.
' .--./| |`--' ,---. ,---.,--. ,--.
| | | |,--.| .-. || .-. |\ ' /
' '--'\| || || '-' '| '-' ' \ '
`-----'`--'`--'| |-' | |-'.-' /
`--' `--' `---'
```
```txt
,-----.,--. ,--.,------. ,------.,--. ,--.
' .--./| | | || .--. '| .--. '\ `.' /
| | | | | || '--' || '--' | '. /
' '--'\| '--.| || | --' | | --' | |
`-----'`-----'`--'`--' `--' `--'
```
```txt
_____ _ _____ _____ _______ __
/ ____| | |_ _| __ \| __ \ \ / /
| | | | | | | |__) | |__) \ \_/ /
| | | | | | | ___/| ___/ \ /
| |____| |____ _| |_| | | | | |
\_____|______|_____|_| |_| |_|
```
xFrednet [Sun, 3 Jul 2022 15:02:48 +0000 (17:02 +0200)]
Correct `[clippy::version]` for 1.62 lints and add note to docs
alexey semenyuk [Sun, 3 Jul 2022 14:44:09 +0000 (17:44 +0300)]
Remove trailing spaces
bors [Sun, 3 Jul 2022 13:10:07 +0000 (13:10 +0000)]
Auto merge of #9106 - usefulmove:master, r=flip1995
corrected README.md book link
This change corrects the book link on the Clippy Book README.md.
changelog: none
Duane [Sun, 3 Jul 2022 03:41:58 +0000 (20:41 -0700)]
corrected README.md book link
Nixon Enraght-Moony [Sat, 2 Jul 2022 17:25:55 +0000 (18:25 +0100)]
ast: Add span to `Extern`
Jason Newcomb [Sat, 2 Jul 2022 19:32:29 +0000 (15:32 -0400)]
Use correct substitutions when checking if `needless_borrow` can apply to a method receiver
Dylan DPC [Sat, 2 Jul 2022 06:53:38 +0000 (12:23 +0530)]
Rollup merge of #98639 - camsteffen:no-node-binding, r=compiler-errors
Factor out `hir::Node::Binding`
Jason Newcomb [Sat, 2 Jul 2022 04:59:58 +0000 (00:59 -0400)]
Fix ICE in `dereference.rs`
bors [Fri, 1 Jul 2022 18:39:54 +0000 (18:39 +0000)]
Auto merge of #9087 - alex-semenyuk:fix_link, r=llogiq
Fix broken link
changelog: none
alexey semenyuk [Fri, 1 Jul 2022 18:31:57 +0000 (18:31 +0000)]
Fix link
bors [Fri, 1 Jul 2022 16:51:34 +0000 (16:51 +0000)]
Auto merge of #9085 - xFrednet:9081-update-format-push-version, r=Manishearth,flip1995
Correct lint version for `format_push_string`
Closes #9081
changelog: none
IDK what else to say. Look I can draw an ascii penguin =D:
```
(^v^)
<( )>
w w
```
xFrednet [Fri, 1 Jul 2022 16:05:45 +0000 (18:05 +0200)]
Correct lint version for `format_push_string`
bors [Fri, 1 Jul 2022 15:51:41 +0000 (15:51 +0000)]
Auto merge of #9082 - Alexendoo:let_unit_allow, r=xFrednet
Fix direct `#[allow]` attributes in `let_unit_value`
Fixes part of #9080
Not sure why it doesn't work when the lint is emitted at the statement, but switching it to the local works fine
changelog: Fix direct `#[allow]` attributes in [`let_unit_value`]
Camille GILLOT [Sun, 13 Feb 2022 15:27:59 +0000 (16:27 +0100)]
Shorten def_span for more items.
Cameron Steffen [Tue, 28 Jun 2022 18:15:30 +0000 (13:15 -0500)]
Factor out hir::Node::Binding
bors [Fri, 1 Jul 2022 12:55:38 +0000 (12:55 +0000)]
Auto merge of #9083 - giraffate:fix_link_in_changelog, r=flip1995
Fix some links
changelog: none
Takayuki Nakata [Fri, 1 Jul 2022 12:30:59 +0000 (21:30 +0900)]
Fix some links
Alex Macleod [Fri, 1 Jul 2022 12:08:28 +0000 (12:08 +0000)]
Fix allow attributes in let_unit_value
bors [Fri, 1 Jul 2022 01:07:25 +0000 (01:07 +0000)]
Auto merge of #9039 - Serial-ATA:dev-dogfood, r=giraffate
Add `cargo dev dogfood`
changelog: Add `cargo dev dogfood`
Part of #5394
bors [Thu, 30 Jun 2022 20:55:04 +0000 (20:55 +0000)]
Auto merge of #9075 - Serial-ATA:update-docs, r=flip1995
Add `dev deprecate` to the development basics
changelog: none
bors [Thu, 30 Jun 2022 19:24:50 +0000 (19:24 +0000)]
Auto merge of #9078 - hamza1311:patch-1, r=xFrednet
Fix broken hyperlink in documentation
changelog: none
The hyperlinks in [`is_digit_ascii_radix`](https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix)'s docs are broken. This PR fixes those.
Muhammad Hamza [Thu, 30 Jun 2022 19:14:38 +0000 (00:14 +0500)]
Fix broken hyperlink
bors [Thu, 30 Jun 2022 17:33:33 +0000 (17:33 +0000)]
Auto merge of #9058 - xFrednet:changelog-1-62, r=flip1995
Changelog for Rust 1.62 :t-rex:
This special artifact was just discovered. The artifact details changes to something called Clippy. Presently and from the context, we were unable to determine what this is supposed to be. All we know, is that it seems to have an active community around it which supports it. The members sometimes use paper clips as a secret symbol for Clippy.
I want to donate this artifact to the rust-lang organization, to have it displayed to the public.
---
changelog: none
Serial [Thu, 30 Jun 2022 16:45:48 +0000 (12:45 -0400)]
Add `dev deprecate` to the development basics
bors [Thu, 30 Jun 2022 16:24:03 +0000 (16:24 +0000)]
Auto merge of #9074 - daxpedda:equatable-if-let-external-macro, r=Manishearth
Fix false-positive in `equatable_if_let`
Was linting in external macros. I guess now that I know about https://github.com/rust-lang/rust-clippy/pull/8694 it seems all kinda pointless until we resolve that.
Nevertheless, it's an improvement.
Fixes #9066.
changelog:`equatable_if_let` No longer lint on macros
dAxpeDDa [Thu, 30 Jun 2022 15:45:34 +0000 (17:45 +0200)]
Fix false-positive in `equatable_if_let`
bors [Thu, 30 Jun 2022 10:43:39 +0000 (10:43 +0000)]
Auto merge of #9071 - Alexendoo:8734, r=dswij
Uncomment test for #8734
I believe the issue was an interaction between rustfix and `span_lint_and_sugg_for_edges`, so this would've been fixed by https://github.com/rust-lang/rust/pull/98261 (Thanks, `@WaffleLapkin!)`
Closes #8734
changelog: none
bors [Thu, 30 Jun 2022 10:27:24 +0000 (10:27 +0000)]
Auto merge of #9070 - flip1995:ci-fix, r=xFrednet
Make sure bors success depends on metadata_collection
r? `@xFrednet`
Currently bors runs the `metadata_collection` but merges before the run is finished, because the bors success dummy step didn't depend on it. This also makes sure that the `metadata_collection` test is run at the same time as the other base runs to not produce overhead.
changelog: none
Alex Macleod [Thu, 30 Jun 2022 10:13:54 +0000 (10:13 +0000)]
Uncomment test for #8734
Philipp Krones [Thu, 30 Jun 2022 09:37:48 +0000 (11:37 +0200)]
Make sure bors success depends on metadata_collection
Philipp Krones [Thu, 30 Jun 2022 08:50:09 +0000 (10:50 +0200)]
bors [Thu, 30 Jun 2022 08:32:54 +0000 (08:32 +0000)]
Auto merge of #9069 - flip1995:rustup, r=flip1995
Rustup
r? `@ghost`
changelog: none
Philipp Krones [Thu, 30 Jun 2022 08:29:22 +0000 (10:29 +0200)]
Bump Clippy version -> 0.1.64
Philipp Krones [Thu, 30 Jun 2022 08:28:58 +0000 (10:28 +0200)]
Bump nightly version -> 2022-06-30
Philipp Krones [Thu, 30 Jun 2022 08:28:04 +0000 (10:28 +0200)]
Fix dogfood
Philipp Krones [Thu, 30 Jun 2022 08:27:25 +0000 (10:27 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup
bors [Thu, 30 Jun 2022 06:18:19 +0000 (06:18 +0000)]
Auto merge of #9068 - tamaroning:fix-typo-2022-6-30, r=giraffate,xFrednet
fix typo in Clippy Lints page
https://rust-lang.github.io/rust-clippy/master/#significant_drop_in_scrutinee
changelog: none
tamaron [Thu, 30 Jun 2022 04:21:17 +0000 (13:21 +0900)]
Update large_const_arrays.rs
bors [Thu, 30 Jun 2022 04:04:08 +0000 (04:04 +0000)]
Auto merge of #8666 - Jarcho:while_let_loop_7913, r=dswij
Don't lint `while_let_loop` when significant drop order would change
fixes #7226
fixes #7913
fixes #5717
For #5717 it may not stay fully fixed. This is only completely fixed right now due to all the allowed drop impls have `#[may_dangle]` on their drop impls. This may get changed in the future based on how significant drops are determined, but the example listed with `RefCell` shouldn't break.
changelog: Don't lint `while_let_loop` when the order of significant drops would change
tamaron [Thu, 30 Jun 2022 02:59:23 +0000 (11:59 +0900)]
fix
Serial [Thu, 30 Jun 2022 02:42:58 +0000 (22:42 -0400)]
Add `dev dogfood` to the book
Jason Newcomb [Fri, 8 Apr 2022 17:21:04 +0000 (13:21 -0400)]
Don't lint `while_let_loop` when drop order would change
Jason Newcomb [Fri, 8 Apr 2022 16:55:48 +0000 (12:55 -0400)]
Extract util functions from `redundant_pattern_match`
bors [Wed, 29 Jun 2022 15:09:37 +0000 (15:09 +0000)]
Auto merge of #9043 - dswij:9037-test, r=Manishearth
`extra_unused_lifetimes` add FP test case emitting from derived attributes.
Add test to cover for #9014 which is fixed in #9037.
changelog: [`extra_unused_lifetimes`] Add FP test case emitting from derived attributes.
---
Seeing the FP from the test:
```sh
$ git revert -m 1
1d1ae10876d3eaa5c982dd3daa083b7c2fc363b9
$ TESTNAME=extra_unused_lifetime cargo uitest
```
bors [Wed, 29 Jun 2022 13:23:21 +0000 (13:23 +0000)]
Auto merge of #8981 - PrestonFrom:more_details_for_significant_drop_lint, r=flip1995
Add details about how significant drop in match scrutinees can cause deadlocks
Adds more details about how a significant drop in a match scrutinee can cause a deadlock and include link to documentation.
changelog: Add more details to significant drop lint to explicitly show how temporaries in match scrutinees can cause deadlocks.
bors [Tue, 28 Jun 2022 18:28:38 +0000 (18:28 +0000)]
Auto merge of #9046 - xFrednet:rust-97660-expection-something-something, r=Jarcho
Fix `#[expect]` for most clippy lints
This PR fixes most `#[expect]` - lint interactions listed in rust-lang/rust#97660. [My comment in the issue](https://github.com/rust-lang/rust/issues/97660#issuecomment-
1147269504 ) shows the current progress (Once this is merged). I plan to work on `duplicate_mod` and `multiple_inherent_impl` and leave the rest for later. I feel like stabilizing the feature is more important than fixing the last few nits, which currently also don't work with `#[allow]`.
---
changelog: none
r? `@Jarcho`
cc: rust-lang/rust#97660
bors [Tue, 28 Jun 2022 18:09:26 +0000 (18:09 +0000)]
Auto merge of #8355 - Jarcho:explicit_auto_deref_2, r=flip1995
Add lint `explicit_auto_deref` take 2
fixes: #234
fixes: #8367
fixes: #8380
Still things to do:
* ~~This currently only lints `&*<expr>` when it doesn't trigger `needless_borrow`.~~
* ~~This requires a borrow after a deref to trigger. So `*<expr>` changing `&&T` to `&T` won't be caught.~~
* The `deref` and `deref_mut` trait methods aren't linted.
* Neither ~~field accesses~~, nor method receivers are linted.
* ~~This probably shouldn't lint reborrowing.~~
* Full slicing to deref should probably be handled here as well. e.g. `&vec[..]` when just `&vec` would do
changelog: new lint `explicit_auto_deref`
bors [Tue, 28 Jun 2022 17:24:06 +0000 (17:24 +0000)]
Auto merge of #8921 - Jarcho:merge_passes, r=llogiq
Add `Operators` lint pass
changelog: None
Jason Newcomb [Wed, 1 Jun 2022 14:43:02 +0000 (10:43 -0400)]
Move `SelfAssignment` into `Operators` lint pass
Jason Newcomb [Tue, 14 Jun 2022 15:44:43 +0000 (11:44 -0400)]
Fix dogfood
Jason Newcomb [Wed, 1 Jun 2022 14:37:37 +0000 (10:37 -0400)]
Move `PtrEq` into `Operators` lin pass
Jason Newcomb [Wed, 1 Jun 2022 14:12:26 +0000 (10:12 -0400)]
Move `NeedlessBitwiseBool` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 13:50:33 +0000 (09:50 -0400)]
Move `ModuloArithmetic` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 06:06:12 +0000 (02:06 -0400)]
Move some lints from `Misc` to `Operators`
Jason Newcomb [Wed, 1 Jun 2022 05:33:06 +0000 (01:33 -0400)]
Move `IntegerDivision` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 05:23:57 +0000 (01:23 -0400)]
Move `IdentityOp` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 05:06:56 +0000 (01:06 -0400)]
Move `FloatEqualityWithoutAbs` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 03:47:59 +0000 (23:47 -0400)]
Move `ErasingOp` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 03:39:00 +0000 (23:39 -0400)]
Move `EqOp` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 02:48:17 +0000 (22:48 -0400)]
Move `DurationSubsec` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 02:32:13 +0000 (22:32 -0400)]
Move `DoubleComparison` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 02:14:43 +0000 (22:14 -0400)]
Move `BitMask` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 01:57:32 +0000 (21:57 -0400)]
Move `AssignOps` into `Operators` lint pass
Jason Newcomb [Wed, 1 Jun 2022 01:27:29 +0000 (21:27 -0400)]
Move `Arithmetic` into `Operators` lint pass
Jason Newcomb [Tue, 31 May 2022 18:07:50 +0000 (14:07 -0400)]
Add `Operators` lint pass
Jason Newcomb [Mon, 13 Jun 2022 17:09:52 +0000 (13:09 -0400)]
Add `explicit_auto_deref` test for variadic function
Jason Newcomb [Mon, 7 Feb 2022 15:29:45 +0000 (10:29 -0500)]
Code cleanup
Jason Newcomb [Mon, 31 Jan 2022 07:06:18 +0000 (02:06 -0500)]
Handle future precedence issues in `explicit_auto_deref` + cleanup
Jason Newcomb [Sun, 30 Jan 2022 01:29:43 +0000 (20:29 -0500)]
Fix `needless_borrow` suggestion when calling a trait method taking `self`
Jason Newcomb [Sat, 29 Jan 2022 23:06:14 +0000 (18:06 -0500)]
Refactor `dereference.rs`
Merge `Position` and `AutoDerefStability`
Jason Newcomb [Sat, 29 Jan 2022 14:36:46 +0000 (09:36 -0500)]
Lint `explicit_auto_deref` immediately after `needless_borrow`
Jason Newcomb [Fri, 28 Jan 2022 19:54:28 +0000 (14:54 -0500)]
Lint `explicit_auto_deref` without a leading borrow
Jason Newcomb [Fri, 28 Jan 2022 15:56:20 +0000 (10:56 -0500)]
Only check parent node once in `dereference.rs`
Jason Newcomb [Fri, 28 Jan 2022 14:12:34 +0000 (09:12 -0500)]
Lint field accesses in `explicit_auto_deref`