-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make clone_on_copy lint machine applicable #4826
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
L-suggestion
Lint: Improving, adding or fixing lint suggestions
Comments
cc @Manishearth |
Manishearth
changed the title
Make more lints machine applicable:
Make clone_on_copy lint machine applicable:
Nov 18, 2019
Manishearth
changed the title
Make clone_on_copy lint machine applicable:
Make clone_on_copy lint machine applicable
Nov 18, 2019
In theory the suggestion is already fixable by rustfix: rust-clippy/clippy_lints/src/methods/mod.rs Lines 1721 to 1725 in 86b8643
Only thing left to do here is to figure out the applicability level. (And maybe pass it through the |
flip1995
added
L-suggestion
Lint: Improving, adding or fixing lint suggestions
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
labels
Nov 18, 2019
Also write rustfix tests, we should avoid having any fixable lints without
tests
…On Mon, Nov 18, 2019, 3:00 PM Philipp Krones ***@***.***> wrote:
In theory the suggestion is already fixable by rustfix:
https://github.com/rust-lang/rust-clippy/blob/86b8643586aa39f36fb7a02e98c8d64d31415e70/clippy_lints/src/methods/mod.rs#L1721-L1725
Only thing left to do here is to figure out the applicability level. (And
maybe pass it through the snippet_with_applicability function)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4826?email_source=notifications&email_token=AAMK6SH7JFBWLXYZ27YQ7GTQUMNADA5CNFSM4JOZMRIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEMHDPA#issuecomment-555250108>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMK6SF2ABR5YXTALAG3I3TQUMNADANCNFSM4JOZMRIA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
L-suggestion
Lint: Improving, adding or fixing lint suggestions
Copy/pasted from rust-lang/rustfix#182:
This gives a warning instead of replacing it with the suggested code:
It would be really nice to have this be done automatically, since I currently have about 20 of these warnings in my code.
The text was updated successfully, but these errors were encountered: