Commit graph

14467 commits

Author SHA1 Message Date
Jason Newcomb
975667945c Fix undocumented_unsafe_blocks in closures 2022-07-04 13:53:42 -04:00
bors
b15f06e74f 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
2022-07-04 00:22:17 +00:00
bors
8c8987749b 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 😄.
2022-07-03 20:02:38 +00:00
Serial
de646e10db Add invalid_utf8_in_unchecked 2022-07-03 15:37:30 -04:00
bors
be9e35f6b2 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.
2022-07-03 19:33:01 +00:00
alexey semenyuk
9ef76e051b
Fixed comment 2022-07-03 19:03:51 +00:00
bors
0fd4f1c75b 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
   _____ _      _____ _____  _______     __
  / ____| |    |_   _|  __ \|  __ \ \   / /
 | |    | |      | | | |__) | |__) \ \_/ /
 | |    | |      | | |  ___/|  ___/ \   /
 | |____| |____ _| |_| |    | |      | |
  \_____|______|_____|_|    |_|      |_|
```
2022-07-03 18:41:54 +00:00
xFrednet
2dd5fc14da
Correct [clippy::version] for 1.62 lints and add note to docs 2022-07-03 17:02:48 +02:00
alexey semenyuk
65655d1e1e
Remove trailing spaces 2022-07-03 17:44:09 +03:00
bors
b8bdbb7a00 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
2022-07-03 13:10:07 +00:00
Duane
815a3ccd79 corrected README.md book link 2022-07-02 20:41:58 -07:00
Jason Newcomb
3e80d3988d Fix ICE in dereference.rs 2022-07-02 00:59:58 -04:00
bors
8c341d66a1 Auto merge of #9087 - alex-semenyuk:fix_link, r=llogiq
Fix broken link

changelog: none
2022-07-01 18:39:54 +00:00
alexey semenyuk
7350525ffb
Fix link 2022-07-01 18:31:57 +00:00
bors
f30b68d9d6 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
```
2022-07-01 16:51:34 +00:00
xFrednet
a86bf81e44
Correct lint version for format_push_string 2022-07-01 18:05:45 +02:00
bors
097f7654b5 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`]
2022-07-01 15:51:41 +00:00
bors
d8970bfa08 Auto merge of #9083 - giraffate:fix_link_in_changelog, r=flip1995
Fix some links

changelog: none
2022-07-01 12:55:38 +00:00
Takayuki Nakata
1988375a25 Fix some links 2022-07-01 21:30:59 +09:00
Alex Macleod
a5b70a4c1d Fix allow attributes in let_unit_value 2022-07-01 12:14:28 +00:00
bors
d4488a520a Auto merge of #9039 - Serial-ATA:dev-dogfood, r=giraffate
Add `cargo dev dogfood`

changelog: Add `cargo dev dogfood`

Part of #5394
2022-07-01 01:07:25 +00:00
bors
23db5ce261 Auto merge of #9075 - Serial-ATA:update-docs, r=flip1995
Add `dev deprecate` to the development basics

changelog: none
2022-06-30 20:55:04 +00:00
bors
6177a4f593 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.
2022-06-30 19:24:50 +00:00
Muhammad Hamza
a2b8a67777
Fix broken hyperlink 2022-07-01 00:14:38 +05:00
bors
2d0195986c Auto merge of #9058 - xFrednet:changelog-1-62, r=flip1995
Changelog for Rust 1.62 🦖

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
2022-06-30 17:33:33 +00:00
Serial
c5053267d2 Add dev deprecate to the development basics 2022-06-30 12:45:48 -04:00
bors
d7e5dab6c3 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
2022-06-30 16:24:03 +00:00
dAxpeDDa
b7051077c9
Fix false-positive in equatable_if_let 2022-06-30 17:45:34 +02:00
bors
4198013522 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
2022-06-30 10:43:39 +00:00
bors
6206d2a439 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
2022-06-30 10:27:24 +00:00
Alex Macleod
6c61f7106f Uncomment test for #8734 2022-06-30 10:13:54 +00:00
Philipp Krones
a131ceab66
Make sure bors success depends on metadata_collection 2022-06-30 11:37:48 +02:00
bors
0cb0f76368 Auto merge of #9069 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2022-06-30 08:32:54 +00:00
Philipp Krones
9de1f9f45a
Bump Clippy version -> 0.1.64 2022-06-30 10:29:22 +02:00
Philipp Krones
d9b2e21039
Bump nightly version -> 2022-06-30 2022-06-30 10:28:58 +02:00
Philipp Krones
bf9b39ae7d
Fix dogfood 2022-06-30 10:28:04 +02:00
Philipp Krones
f26cf11fe8
Merge remote-tracking branch 'upstream/master' into rustup 2022-06-30 10:27:25 +02:00
bors
ff3964af1b 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
2022-06-30 06:18:19 +00:00
tamaron
5d9e1b6f00 Update large_const_arrays.rs 2022-06-30 13:21:17 +09:00
bors
88591ba239 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
2022-06-30 04:04:08 +00:00
tamaron
5d75a9bd4c fix 2022-06-30 11:59:23 +09:00
Serial
131770d22b Add dev dogfood to the book 2022-06-29 22:42:58 -04:00
Jason Newcomb
adbc8499d3 Don't lint while_let_loop when drop order would change 2022-06-29 13:43:05 -04:00
Jason Newcomb
58434ae385 Extract util functions from redundant_pattern_match 2022-06-29 13:42:59 -04:00
bors
70f1d0d8fd 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 1d1ae10876
$ TESTNAME=extra_unused_lifetime cargo uitest
```
2022-06-29 15:09:37 +00:00
bors
90227c10f7 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.
2022-06-29 13:23:21 +00:00
bors
4995b4e584 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
2022-06-28 18:28:38 +00:00
bors
a4130e1612 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`
2022-06-28 18:09:26 +00:00
bors
23c6765276 Auto merge of #8921 - Jarcho:merge_passes, r=llogiq
Add `Operators` lint pass

changelog: None
2022-06-28 17:24:06 +00:00
Jason Newcomb
ffbba8550a Move SelfAssignment into Operators lint pass 2022-06-28 13:03:08 -04:00