]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agocheck last statement
kyoto7250 [Mon, 20 Jun 2022 02:05:40 +0000 (11:05 +0900)]
check last statement

2 years agocargo dev fmt
kyoto7250 [Sat, 18 Jun 2022 09:29:39 +0000 (18:29 +0900)]
cargo dev fmt

2 years agocheck macro in eq_block
kyoto7250 [Sat, 18 Jun 2022 09:24:39 +0000 (18:24 +0900)]
check macro in eq_block

2 years agocheck only first statement
kyoto7250 [Sat, 18 Jun 2022 08:49:03 +0000 (17:49 +0900)]
check only first statement

2 years agocheck macro_backtrace only
kyoto7250 [Sat, 18 Jun 2022 08:41:26 +0000 (17:41 +0900)]
check macro_backtrace only

2 years agocheck only the end
kyoto7250 [Fri, 17 Jun 2022 15:19:30 +0000 (00:19 +0900)]
check only the end

2 years agouse get_diagnostic_name for checking macro_call
kyoto7250 [Fri, 17 Jun 2022 01:10:40 +0000 (10:10 +0900)]
use get_diagnostic_name for checking macro_call

2 years agofeat(fix): ignore todo! and unimplemented! in if_same_then_else
kyoto7250 [Thu, 16 Jun 2022 12:29:43 +0000 (21:29 +0900)]
feat(fix): ignore todo! and unimplemented! in if_same_then_else

2 years agoIgnore bodies containing `todo!()` in `clippy::if_same_then_else`
Dany Marcoux [Wed, 18 May 2022 18:28:11 +0000 (20:28 +0200)]
Ignore bodies containing `todo!()` in `clippy::if_same_then_else`

2 years agoAuto merge of #8964 - tamaroning:read_zero_byte_vec, r=dswij
bors [Wed, 15 Jun 2022 06:16:14 +0000 (06:16 +0000)]
Auto merge of #8964 - tamaroning:read_zero_byte_vec, r=dswij

Warn about read into zero-length `Vec`

Closes #8886

- \[x] Followed [lint naming conventions][lint_naming]
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`

changelog: none

2 years agoAuto merge of #8999 - Alexendoo:error-pattern, r=xFrednet
bors [Tue, 14 Jun 2022 16:54:13 +0000 (16:54 +0000)]
Auto merge of #8999 - Alexendoo:error-pattern, r=xFrednet

Remove error-pattern comments

The `clippy_lints` one [is unused](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60error-pattern.60), the others in `ui-toml` also appear not to have an effect

changelog: none

2 years agoRemove error-pattern comments
Alex Macleod [Tue, 14 Jun 2022 16:28:34 +0000 (16:28 +0000)]
Remove error-pattern comments

2 years agoadd lint
tamaron [Mon, 6 Jun 2022 13:48:05 +0000 (22:48 +0900)]
add lint

2 years agoAuto merge of #8947 - Serial-ATA:lint-produces-output, r=xFrednet
bors [Tue, 14 Jun 2022 10:42:09 +0000 (10:42 +0000)]
Auto merge of #8947 - Serial-ATA:lint-produces-output, r=xFrednet

Add lint output to lint list

changelog: Add the ability to show the lint output in the lint list

This just adds the logic to produce the output, it hasn't been added to any lints yet. It did help find some mistakes in some docs though :smile:.

### Screenshots

<details>
<summary>A single code block</summary>

![single-code-block](https://user-images.githubusercontent.com/69764315/172013766-145b22b1-1d91-4fb8-9cd0-b967a52d6330.png)
</details>

<details>
<summary>A single code block with a "Use instead" section</summary>

![with-usage](https://user-images.githubusercontent.com/69764315/172013792-d2dd6c9c-defa-41e0-8c27-8e8e311adb63.png)
</details>

<details>
<summary>Multiple code blocks</summary>

![multi-code-block](https://user-images.githubusercontent.com/69764315/172013808-5328f59b-e7c5-4914-a396-253822a6d350.png)
</details>

This is the last task in #7172 :tada:.
r? `@xFrednet` (?)

2 years agoAuto merge of #8901 - Jarcho:sharing_code, r=dswij
bors [Tue, 14 Jun 2022 08:59:40 +0000 (08:59 +0000)]
Auto merge of #8901 - Jarcho:sharing_code, r=dswij

Rework `branches_sharing_code`

fixes #7378

This changes the lint from checking pairs of blocks, to checking all the blocks at the same time. As such there's almost none of the original code left.

changelog: Don't lint `branches_sharing_code` when using different binding names

2 years agoAuto merge of #8997 - Jarcho:clap_deprecate, r=flip1995
bors [Tue, 14 Jun 2022 08:33:52 +0000 (08:33 +0000)]
Auto merge of #8997 - Jarcho:clap_deprecate, r=flip1995

Fix `clap` deprecation warnings

Clap `3.2.0` deprecated a few functions used by lintcheck.

changelog: None

2 years agoFix `clap` deprecation warnings
Jason Newcomb [Tue, 14 Jun 2022 01:10:30 +0000 (21:10 -0400)]
Fix `clap` deprecation warnings

2 years agoAuto merge of #8988 - xFrednet:8947-test-monster-in-bors-ci, r=flip1995
bors [Mon, 13 Jun 2022 08:21:54 +0000 (08:21 +0000)]
Auto merge of #8988 - xFrednet:8947-test-monster-in-bors-ci, r=flip1995

Test metadata collection in Bors CI workflow

This PR adds a new check to bors CI workflows, which ensures that the metadata collection success, when it's run as part of the `deploy` script. I've only added it to bors workflows, as the runtime will be high while it'll also succeed most of the time. This is a preparation for rust-lang/rust-clippy#8947.

---

changelog: none

r? `@ghost`

2 years agoAuto merge of #8983 - Alexendoo:redundant_closure_tests, r=giraffate
bors [Mon, 13 Jun 2022 00:14:31 +0000 (00:14 +0000)]
Auto merge of #8983 - Alexendoo:redundant_closure_tests, r=giraffate

Add tests for some fixed `redundant_closure` issues

closes #7861
closes #5939

changelog: none

2 years agoTest metadata collection in Bors CI workflow
xFrednet [Sun, 12 Jun 2022 13:51:00 +0000 (15:51 +0200)]
Test metadata collection in Bors CI workflow

2 years agoAdd tests for some fixed redundant_closure issues
Alex Macleod [Fri, 10 Jun 2022 13:25:22 +0000 (13:25 +0000)]
Add tests for some fixed redundant_closure issues

2 years agoAuto merge of #8976 - xFrednet:rust-97660-catch-emissions-with-expect, r=Jarcho
bors [Thu, 9 Jun 2022 22:28:36 +0000 (22:28 +0000)]
Auto merge of #8976 - xFrednet:rust-97660-catch-emissions-with-expect, r=Jarcho

Fix some `#[expect]` lint interaction

Fixing the first few lints that aren't caught by `#[expect]`. The root cause of these examples was, that the lint was emitted at the wrong location.

---

changelog: none

r? `@Jarcho`

cc: rust-lang/rust#97660

2 years agoAuto merge of #8979 - Alexendoo:version-numbers, r=flip1995
bors [Thu, 9 Jun 2022 14:02:36 +0000 (14:02 +0000)]
Auto merge of #8979 - Alexendoo:version-numbers, r=flip1995

Correct some `#[clippy::version]`s

Some were a bit off

changelog: none

2 years agoCorrect some `#[clippy::version]`s
Alex Macleod [Thu, 9 Jun 2022 13:43:26 +0000 (13:43 +0000)]
Correct some `#[clippy::version]`s

2 years agoAuto merge of #8954 - Serial-ATA:doc-comment-issues, r=xFrednet
bors [Thu, 9 Jun 2022 11:03:49 +0000 (11:03 +0000)]
Auto merge of #8954 - Serial-ATA:doc-comment-issues, r=xFrednet

Improve lint doc consistency

changelog: none

This is a continuation of #8908.

Notable changes:
- Removed empty `Known Problems` sections
- Removed "Good"/"Bad" language (replaced with "Use instead")
- Removed (and added some :smile:) duplication
- Ignored the [`create_dir`] example so it doesn't create `clippy_lints/foo` :smile:

2 years agoFix [`needless_bool`] example
Serial [Thu, 9 Jun 2022 10:54:01 +0000 (06:54 -0400)]
Fix [`needless_bool`] example

2 years agoFix `#[expect]` for `default_numeric_fallback`
xFrednet [Thu, 9 Jun 2022 07:17:46 +0000 (09:17 +0200)]
Fix `#[expect]` for `default_numeric_fallback`

2 years agoAuto merge of #8907 - kyoto7250:fix_8898, r=giraffate
bors [Thu, 9 Jun 2022 00:04:09 +0000 (00:04 +0000)]
Auto merge of #8907 - kyoto7250:fix_8898, r=giraffate

fix(lint): check const context

close: https://github.com/rust-lang/rust-clippy/issues/8898

This PR fixes a bug in checked_conversions.

Thank you in advance.

changelog: check const context in checked_conversions.

2 years agoAuto merge of #8950 - Jarcho:derive_non_pub, r=dswij
bors [Wed, 8 Jun 2022 14:03:50 +0000 (14:03 +0000)]
Auto merge of #8950 - Jarcho:derive_non_pub, r=dswij

Fixes for `derive_partial_eq_without_eq`

fixes  #8875

changelog: Don't lint `derive_partial_eq_without_eq` on non-public types
changelog: Better handle generics in `derive_partial_eq_without_eq`

2 years agoAuto merge of #8960 - Jarcho:iter_cloned, r=giraffate
bors [Wed, 8 Jun 2022 00:41:05 +0000 (00:41 +0000)]
Auto merge of #8960 - Jarcho:iter_cloned, r=giraffate

Changes to `iter_overeager_cloned`

fixes: #8494

changelog: Don't lint `iter_overeager_cloned` on `.cloned().flatten()` when `T::Item` doesn't implement `IntoIterator`

2 years agoHide unnecessary code in [`implicit_saturating_sub`]
Serial [Tue, 7 Jun 2022 22:51:45 +0000 (18:51 -0400)]
Hide unnecessary code in [`implicit_saturating_sub`]

2 years agoChanges to `iter_overeager_cloned`
Jason Newcomb [Tue, 7 Jun 2022 04:40:32 +0000 (00:40 -0400)]
Changes to `iter_overeager_cloned`
* Don't lint on `.cloned().flatten()` when `T::Item` doesn't implement `IntoIterator`
* Reduce verbosity of lint message
* Narrow down the scope of the replacement range

2 years agoSuppress `unused` in doc examples
Serial [Tue, 7 Jun 2022 00:28:16 +0000 (20:28 -0400)]
Suppress `unused` in doc examples

2 years agoAdd lint output to lint list
Serial [Sat, 28 May 2022 19:27:53 +0000 (15:27 -0400)]
Add lint output to lint list

2 years agoAuto merge of #7359 - joshrotenberg:clippy_guide, r=xFrednet
bors [Mon, 6 Jun 2022 16:53:37 +0000 (16:53 +0000)]
Auto merge of #7359 - joshrotenberg:clippy_guide, r=xFrednet

Clippy book

A work in progress Clippy Book using mdbook. See #6011.

This is currently just a moving around of things:

1. The current README.md split up a bit and put into sections.
1. A rough outline of Clippy lint categories (currently no content, potentially add a basic introduction for each and some example, see questions below.
1. The `docs` content repurposed into a top level `Development` section.
1. The current Roadmap.

Some big questions:

1. is `guide/` the right place? I'm modeling after mdbook itself.
1. What is the relationship between ALL the Clippy Lints and this guide? It seems like they can coexist. Does that mean the guide should just point to the current side with regard to actual lints, and maybe just include some examples to keep it interesting? Keeping both up to date seems like a maintenance nightmare unless its automated somehow. Or should the current ALL the Clippy lints somehow be incorporated into the book?
1. Related to the above, where should this guide be published since the `gh-pages` branch is already in use?
1. This PR doesn't currently change any existing content. Obviously that would make sense assuming the general structure and relocation is an acceptable approach.

---

Open Tasks for follow up PR:
- Set up CI/CD
- Split up Installation and Usage
- Add more content to Usage (and Installation) chapters
- Enhance CI chapter with more examples for different CIs

---

changelog: The first version of the *Clippy Book*
staring, *The Clippy Team*, *Bors* and *rustc*

2 years agoAuto merge of #8944 - xFrednet:8877-append-doc-idents, r=Manishearth
bors [Mon, 6 Jun 2022 16:34:27 +0000 (16:34 +0000)]
Auto merge of #8944 - xFrednet:8877-append-doc-idents, r=Manishearth

List configuration values can now be extended instead of replaced

I've seen some `clippy.toml` files, that have a few additions to the default list of a configuration and then a copy of our default. The list will therefore not be updated, when we add new names. This change should make it simple for new users to append values instead of replacing them.

I'm uncertain if the documentation of the `".."` is apparent. Any suggestions are welcome. I've also check that the lint list displays the examples correctly.

<details>
<summary>Lint list screenshots</summary>

![image](https://user-images.githubusercontent.com/17087237/171999434-393f2f83-09aa-4bab-8b05-bd4973150f27.png)

![image](https://user-images.githubusercontent.com/17087237/171999401-e6942b53-25e6-4b09-89e5-d867c7463156.png)

</details>

---

changelog: enhancement: [`doc_markdown`]: Users can now indicate, that the `doc-valid-idents` should extend the default and not replace it
changelog: enhancement: [`blacklisted-name`]: Users can now indicate, that the `blacklisted-names` should extend the default and not replace it

Closes: #8877
That's it. Have a fantastic weekend to everyone reading this. Here is a cookie :cookie:

2 years agoBook: Improve release documentation
Philipp Krones [Mon, 6 Jun 2022 12:41:36 +0000 (14:41 +0200)]
Book: Improve release documentation

Make it clear for all code blocks in which repository they should be
run. Also make sure that the correct beta commit is fetched.

2 years agoBook: Improve sync documentation
Philipp Krones [Mon, 6 Jun 2022 11:25:11 +0000 (13:25 +0200)]
Book: Improve sync documentation

- Move doc about defining remotes to the front and use the defined
  remotes in the further documentation
- Don't recommend pushing to the remote repo directly
- Add some clarifying comments

2 years agoBook: Improve chapter on CI
Philipp Krones [Mon, 6 Jun 2022 11:12:53 +0000 (13:12 +0200)]
Book: Improve chapter on CI

Recommend the -Dwarnings and --all-targets/--all-features more strongly.

2 years agoRemove bit-rotty list of Clippy team members from CONTRIBUTING.md
Philipp Krones [Mon, 6 Jun 2022 11:05:08 +0000 (13:05 +0200)]
Remove bit-rotty list of Clippy team members from CONTRIBUTING.md

2 years agoAuto update lint count in Clippy book
flip1995 [Sun, 17 Apr 2022 18:43:43 +0000 (20:43 +0200)]
Auto update lint count in Clippy book

2 years agoBook: Add infrastructure description
flip1995 [Sun, 17 Apr 2022 18:40:09 +0000 (20:40 +0200)]
Book: Add infrastructure description

2 years agoMove parts of CONTRIBUTING.md to the book
flip1995 [Sun, 17 Apr 2022 14:43:56 +0000 (16:43 +0200)]
Move parts of CONTRIBUTING.md to the book

2 years agoBook: Add continuous integration description
flip1995 [Sun, 17 Apr 2022 14:19:00 +0000 (16:19 +0200)]
Book: Add continuous integration description

2 years agoBook: Add Proposals description
flip1995 [Sun, 17 Apr 2022 14:08:39 +0000 (16:08 +0200)]
Book: Add Proposals description

2 years agoBook: Restructure Dev chapter
flip1995 [Sun, 17 Apr 2022 14:02:33 +0000 (16:02 +0200)]
Book: Restructure Dev chapter

Group everything that has something to do with Clippy development under
the "Development" chapter, so that Clippy users can't get confused.

2 years agoBook: Write lint group descriptions
flip1995 [Sun, 17 Apr 2022 13:45:44 +0000 (15:45 +0200)]
Book: Write lint group descriptions

This removes the empty separate files for the different groups and adds
a single file giving short explanations for each group and what to
expect from those groups.

2 years agoBook: Split up and rewrite installation and usage
flip1995 [Fri, 21 Jan 2022 17:24:43 +0000 (18:24 +0100)]
Book: Split up and rewrite installation and usage

2 years agoBook: Update GHA doc and remove GitLab placeholder
flip1995 [Fri, 21 Jan 2022 16:33:01 +0000 (17:33 +0100)]
Book: Update GHA doc and remove GitLab placeholder

2 years agoRemove Edition 2018 tests section from adding lints doc
flip1995 [Fri, 21 Jan 2022 16:29:18 +0000 (17:29 +0100)]
Remove Edition 2018 tests section from adding lints doc

The UI tests now use the latest edition by default. Testing on older
editions should almost never be necessary, so I don't see a need to
document this.

2 years agoReformat internal docs
flip1995 [Fri, 21 Jan 2022 16:27:57 +0000 (17:27 +0100)]
Reformat internal docs

This reformats all the internal docs, so that the md files use at most
80 characters per line. This is the usual formatting of md files. We
allow 120 chars per line in CI though.

2 years agoMove syncing doc to book
flip1995 [Fri, 21 Jan 2022 16:11:00 +0000 (17:11 +0100)]
Move syncing doc to book

2 years agoMove internal documentation to book
flip1995 [Fri, 21 Jan 2022 15:55:26 +0000 (16:55 +0100)]
Move internal documentation to book

2 years agoBook: add a ci chapter
josh rotenberg [Tue, 3 Aug 2021 20:05:20 +0000 (13:05 -0700)]
Book: add a ci chapter

2 years agoInitial commit for the Clippy Book
josh rotenberg [Wed, 16 Jun 2021 05:05:44 +0000 (22:05 -0700)]
Initial commit for the Clippy Book

2 years agoFix `#[expect]` for `async_yields_async`
xFrednet [Mon, 6 Jun 2022 12:03:11 +0000 (14:03 +0200)]
Fix `#[expect]` for `async_yields_async`

2 years agoAuto merge of #8933 - DennisOSRM:needless_braces_range_literal, r=dswij
bors [Mon, 6 Jun 2022 10:58:33 +0000 (10:58 +0000)]
Auto merge of #8933 - DennisOSRM:needless_braces_range_literal, r=dswij

Add new lint [`needless_parens_on_range_literals`]

changelog: Adds a new lint [`needless_parens_on_range_literals`] to warn on needless braces on literals in a range statement

For example, the lint would catch

```log
error: needless parenthesis on range literals can be removed
  --> $DIR/needless_parens_on_range_literals.rs:8:13
   |
LL |     let _ = ('a')..=('z');
   |             ^^^^^ help: try: `'a'`
   |
   = note: `-D clippy::needless-parens-on-range-literals` implied by `-D warnings`
```

2 years agoFix `#[expect]` for `same_name_method`
xFrednet [Mon, 6 Jun 2022 10:36:57 +0000 (12:36 +0200)]
Fix `#[expect]` for `same_name_method`

2 years agoFix `#[expect]` for `needless_borrow`, `ref_binding_to_ref`
xFrednet [Mon, 6 Jun 2022 09:51:36 +0000 (11:51 +0200)]
Fix `#[expect]` for `needless_borrow`, `ref_binding_to_ref`

2 years agoAuto merge of #8951 - mikerite:needless-late-init-20220605, r=giraffate
bors [Mon, 6 Jun 2022 00:25:14 +0000 (00:25 +0000)]
Auto merge of #8951 - mikerite:needless-late-init-20220605, r=giraffate

Some refactoring in `needless_late_init`

changelog: none

2 years agoUpdate CHANGELOG.md
Dennis Luxen [Sun, 5 Jun 2022 20:13:08 +0000 (22:13 +0200)]
Update CHANGELOG.md

2 years agoFix names to use plural
Dennis Luxen [Sun, 5 Jun 2022 20:12:30 +0000 (22:12 +0200)]
Fix names to use plural

2 years agoApply suggestions from code review
Dennis Luxen [Sun, 5 Jun 2022 19:41:00 +0000 (21:41 +0200)]
Apply suggestions from code review

Co-authored-by: dswij <dharmasw@outlook.com>
2 years agoRerun cargo dev update_lints
Dennis Luxen [Sat, 4 Jun 2022 20:12:35 +0000 (22:12 +0200)]
Rerun cargo dev update_lints

2 years agoImplement suggestion generation with snippet_with_applicability(.)
Dennis Luxen [Sat, 4 Jun 2022 20:08:33 +0000 (22:08 +0200)]
Implement suggestion generation with snippet_with_applicability(.)

2 years agoImplement support for implicit start and end
Dennis Luxen [Sat, 4 Jun 2022 20:01:52 +0000 (22:01 +0200)]
Implement support for implicit start and end

2 years agoMove description into lint macro
Dennis Luxen [Sat, 4 Jun 2022 19:48:44 +0000 (21:48 +0200)]
Move description into lint macro

2 years agoRewrite check to account for floating point literals
Dennis Luxen [Sat, 4 Jun 2022 19:44:37 +0000 (21:44 +0200)]
Rewrite check to account for floating point literals

2 years agoFix misnomer braces -> parenthesis
Dennis Luxen [Sat, 4 Jun 2022 17:37:28 +0000 (19:37 +0200)]
Fix misnomer braces -> parenthesis

2 years agoUpdate clippy_lints/src/needless_braces_on_range_literal.rs
Dennis Luxen [Sat, 4 Jun 2022 19:45:19 +0000 (21:45 +0200)]
Update clippy_lints/src/needless_braces_on_range_literal.rs

Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
2 years agoUpdate clippy_lints/src/needless_braces_on_range_literal.rs
Dennis Luxen [Sat, 4 Jun 2022 17:12:32 +0000 (19:12 +0200)]
Update clippy_lints/src/needless_braces_on_range_literal.rs

Co-authored-by: Alex <69764315+Serial-ATA@users.noreply.github.com>
2 years agoAdd new lint [`needless_braces_on_range_literal`]
Dennis Luxen [Fri, 3 Jun 2022 14:12:26 +0000 (16:12 +0200)]
Add new lint [`needless_braces_on_range_literal`]

2 years agoMake [`create_dir`] example ignored
Serial [Sun, 5 Jun 2022 20:06:47 +0000 (16:06 -0400)]
Make [`create_dir`] example ignored

2 years agoImprove lint doc consistency
Serial [Sun, 5 Jun 2022 19:24:41 +0000 (15:24 -0400)]
Improve lint doc consistency

2 years agoAuto merge of #8941 - DevAccentor:for_loops_over_fallibles, r=llogiq
bors [Sun, 5 Jun 2022 11:16:37 +0000 (11:16 +0000)]
Auto merge of #8941 - DevAccentor:for_loops_over_fallibles, r=llogiq

improve [`for_loops_over_fallibles`] to detect the usage of iter, iter_mut and into_iterator

fix #6762

detects code like
```rust
for _ in option.iter() {
    //..
}
```

changelog: Improve [`for_loops_over_fallibles`] to detect `for _ in option.iter() {}` or using `iter_mut()` or `into_iterator()`.

2 years agochange based on review
DevAccentor [Sun, 5 Jun 2022 08:26:29 +0000 (10:26 +0200)]
change based on review

2 years agoneedless_late_init refactoring
Michael Wright [Sun, 5 Jun 2022 05:28:28 +0000 (07:28 +0200)]
needless_late_init refactoring

Remove the unneeded wrapping and unwrapping in suggestion creation.
Collecting to Option<Vec<_>> only returns None if one of the elements is
None and that is never the case here.

2 years agoneedless_late_init refactoring
Michael Wright [Sun, 5 Jun 2022 05:22:45 +0000 (07:22 +0200)]
needless_late_init refactoring

Simplify the creation of suggestions by using `flat_map` instead of
`chain`. Note that the order of the suggestions is not important.

2 years agoneedless_late_init refactoring
Michael Wright [Sun, 5 Jun 2022 05:14:31 +0000 (07:14 +0200)]
needless_late_init refactoring

Remove duplication in creating suggestions by first mapping assignments
to spans and then suggestions.

2 years agoActually get the correct `ParamEnv` in `derive_partial_eq_without_eq`
Jason Newcomb [Sun, 5 Jun 2022 00:21:56 +0000 (20:21 -0400)]
Actually get the correct `ParamEnv` in `derive_partial_eq_without_eq`

2 years agoDon't lint `derive_partial_eq_without_eq` on private types
Jason Newcomb [Sat, 4 Jun 2022 21:28:23 +0000 (17:28 -0400)]
Don't lint `derive_partial_eq_without_eq` on private types

2 years agoList configuration values can now be extended instead of replaced
xFrednet [Sat, 4 Jun 2022 12:35:44 +0000 (14:35 +0200)]
List configuration values can now be extended instead of replaced

2 years agoAuto merge of #8930 - kyoto7250:issue_8920, r=Alexendoo
bors [Sat, 4 Jun 2022 13:05:27 +0000 (13:05 +0000)]
Auto merge of #8930 - kyoto7250:issue_8920, r=Alexendoo

fix(manual_find_map and manual_filter_map): check clone method

close #8920

Added conditional branching when the clone method is used.

Thank you in advance.

---

changelog: check `clone()` and other variant preserving methods in [`manual_find_map`] and [`manual_filter_map`]

2 years agorefactor: check copied and cloned
kyoto7250 [Sat, 4 Jun 2022 12:20:41 +0000 (21:20 +0900)]
refactor: check copied and cloned

2 years agoAuto merge of #8942 - flip1995:rustup, r=flip1995
bors [Sat, 4 Jun 2022 10:55:48 +0000 (10:55 +0000)]
Auto merge of #8942 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

2 years agoBump nightly version -> 2022-06-04
Philipp Krones [Sat, 4 Jun 2022 10:54:20 +0000 (12:54 +0200)]
Bump nightly version -> 2022-06-04

2 years agoMerge remote-tracking branch 'upstream/master' into rustup
Philipp Krones [Sat, 4 Jun 2022 10:53:27 +0000 (12:53 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

2 years agoAuto merge of #8843 - Serial-ATA:collect-renamed, r=xFrednet
bors [Sat, 4 Jun 2022 09:49:27 +0000 (09:49 +0000)]
Auto merge of #8843 - Serial-ATA:collect-renamed, r=xFrednet

Collect renamed lints

changelog: Display past names of renamed lints on Clippy's lint list

cc #7172

r? `@xFrednet`

2 years agoimprove for_loops_over_fallibles to detect the usage of iter, iter_mut and into_iterator
DevAccentor [Sat, 4 Jun 2022 09:03:11 +0000 (11:03 +0200)]
improve for_loops_over_fallibles to detect the usage of iter, iter_mut and into_iterator

2 years agorefactor: Add some methods
kyoto7250 [Sat, 4 Jun 2022 07:55:33 +0000 (16:55 +0900)]
refactor: Add some methods

2 years agoAuto merge of #8937 - Jarcho:merge_match_passes, r=llogiq
bors [Sat, 4 Jun 2022 07:41:27 +0000 (07:41 +0000)]
Auto merge of #8937 - Jarcho:merge_match_passes, r=llogiq

Merge various passes into `Matches`

changelog: None

2 years agoMove `ManualMap` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 23:01:44 +0000 (19:01 -0400)]
Move `ManualMap` into `Matches` lint pass

2 years agoMove `TryErr` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 18:31:36 +0000 (14:31 -0400)]
Move `TryErr` into `Matches` lint pass

2 years agoMerge `SignificantDropInScrutinee` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 17:35:10 +0000 (13:35 -0400)]
Merge `SignificantDropInScrutinee` into `Matches` lint pass

2 years agoMove `MatchStrCaseMismatch` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 17:16:02 +0000 (13:16 -0400)]
Move `MatchStrCaseMismatch` into `Matches` lint pass

2 years agoMove `MatchOnVecItems` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 17:10:57 +0000 (13:10 -0400)]
Move `MatchOnVecItems` into `Matches` lint pass

2 years agoMerge `ManualUnwrapOr` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 16:29:54 +0000 (12:29 -0400)]
Merge `ManualUnwrapOr` into `Matches` lint pass

2 years agoAuto merge of #8934 - DevAccentor:as_underscore, r=Manishearth
bors [Fri, 3 Jun 2022 19:24:53 +0000 (19:24 +0000)]
Auto merge of #8934 - DevAccentor:as_underscore, r=Manishearth

add [`as_underscore`] lint

closes #8847

detect usage of `as _` and enforce the usage of explicit type like
```rust
fn foo(n: usize) {}
let n: u16 = 256;
foo(n as _);
```
will suggest to change to
```rust
fn foo(n: usize) {}
let n: u16 = 256;
foo(n as usize);
```

changelog: add [`as_underscore`] lint

2 years agoMerge `CollapsibleMatch` into `Matches` lint pass
Jason Newcomb [Fri, 3 Jun 2022 16:14:24 +0000 (12:14 -0400)]
Merge `CollapsibleMatch` into `Matches` lint pass

2 years agoadd as_underscore lint
DevAccentor [Fri, 3 Jun 2022 13:59:26 +0000 (15:59 +0200)]
add as_underscore lint