Skip to content

Update Clippy #87579

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 57 commits into from
Jul 29, 2021
Merged

Update Clippy #87579

merged 57 commits into from
Jul 29, 2021

Conversation

flip1995
Copy link
Member

th1000s and others added 30 commits July 13, 2021 23:21
changelog: [`similar_names`] lint no longer suggests to insert or add an underscore
to "fix" too similar names
similar_names: No longer suggest inserting or appending an underscore

changelog: [`similar_names`] lint no longer suggests to insert or add an underscore to "fix" too similar names
… r=giraffate

Documented constant expression evaluation for `repeat_once`

Documents the fact that the `repeat_once` lint evaluates constant expressions

---

closes: rust-lang#7306

changelog: none
(I don't think it's worth a change log entry, as nothing has really changed)

r? `@giraffate` as you've implemented the lint and were part of the discussion in the issue 🙃
Store all HIR owners in the same container

This replaces the previous storage in a BTreeMap for each of Item/ImplItem/TraitItem/ForeignItem.
This should allow for a more compact storage.

Based on rust-lang#83114
This commit closes rust-lang#7389. As stated in the issue, `cargo clippy --help`
provides explanation for some flags and states that the rest are same
as in `cargo check --help`, even though some clippy specific flags
exist.

This commit extends the `cargo clippy --help` with two additional flags,
  - `cargo clippy --fix`
  - `cargo clippy --no-deps`

If there are more flags which are not present in `cargo check --help`
please bring these to my attention, I will include these aswell.
For now, I noticed only the two flags mentioned above.
Some `clippy::author` improvements

changelog: none

* Use `Debug` instead of re-implementing it for some things
* Fix block trailing expression handing
* Don't double print on stmt/expr with `#[clippy::author]` attribute
Enhance needless continue to detect loop {continue;}

Fixes rust-lang#7417

changelog: Report [`needless_continue`] in `loop { continue; }` case
Add to test third party crates list

changelog: none
…impl-type, r=camsteffen

Prefer a code snipped over formatting the self type (`new_without_default`)

Fixes: rust-lang/rust-clippy#7220

changelog: [`new_without_default`]: The `Default` impl block type doesn't use the full type path qualification

Have a nice day to everyone reading this 🙃
`--no-deps` filled in with a little more information. Explain that
`--fix` implies `--no-deps`.
Explain that `--no-deps` is used with `cargo clippy --`, including
one example.
bors and others added 5 commits July 28, 2021 13:15
Rollup of 3 pull requests

Successful merges:

 - rust-lang#7279 (Adapting the lint list to Clippy's new metadata format)
 - rust-lang#7298 (Switch CI to new metadata collection)
 - rust-lang#7420 (Update lint documentation to use markdown headlines)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

changelog: rollup
Rustup

r? `@ghost`

changelog: none
@rust-highfive
Copy link
Contributor

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2021
@flip1995 flip1995 changed the title Update Clippy WIP: Update Clippy Jul 29, 2021
@flip1995
Copy link
Member Author

I still have to rename 2 lints. Let me do that real quick.

@rust-log-analyzer

This comment has been minimized.

flip1995 and others added 4 commits July 29, 2021 12:10
self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain
Rename two lints to comply with our lint naming convention

self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain

We don't need to `register_renamed` those lints, since I'll backport them to beta, so the old names won't hit stable.

changelog: none
(I'll adapt the changelog before merging rust-lang#7498)
@flip1995 flip1995 changed the title WIP: Update Clippy Update Clippy Jul 29, 2021
@flip1995
Copy link
Member Author

Ok, this should be ready now.

@Manishearth
Copy link
Member

@bors r+ rollup=iffy p=1

@bors
Copy link
Collaborator

bors commented Jul 29, 2021

📌 Commit 8570a36 has been approved by Manishearth

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2021
@bors
Copy link
Collaborator

bors commented Jul 29, 2021

⌛ Testing commit 8570a36 with merge a985d8e...

@bors
Copy link
Collaborator

bors commented Jul 29, 2021

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing a985d8e to master...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.