Skip to content
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

Fixes #5405: redundant clone false positive with arrays #5453

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

rabisg0
Copy link
Contributor

@rabisg0 rabisg0 commented Apr 12, 2020

Check whether slice elements implement Copy before suggesting to drop
the clone method

changelog: add a check for slice indexing on redundant_clone lint

@phansch
Copy link
Member

phansch commented Apr 12, 2020

Thanks for the PR!

You're currently getting a dead_code error on CI - You can either call the issue_5405 function from main or add an #![allow(dead_code)] to the top of the ui test file to fix it.

@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Apr 12, 2020
@phansch phansch self-requested a review April 12, 2020 12:59
@rabisg0
Copy link
Contributor Author

rabisg0 commented Apr 13, 2020

Hey @phansch
Thanks for looking into it. I fixed that problem but Im running into a different issue w.r.t. fix suggestion.
Will update this patch once I fix that

Check whether slice elements implement Copy before suggesting to drop
the clone method
@rabisg0 rabisg0 force-pushed the fix/redundant_clone branch from a0defdd to ab3946d Compare April 13, 2020 06:14
@phansch phansch added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Apr 13, 2020
@phansch
Copy link
Member

phansch commented Apr 14, 2020

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Apr 14, 2020

📌 Commit ab3946d has been approved by phansch

@bors
Copy link
Contributor

bors commented Apr 14, 2020

⌛ Testing commit ab3946d with merge 74e9256...

@bors
Copy link
Contributor

bors commented Apr 14, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing 74e9256 to master...

@bors bors merged commit 74e9256 into rust-lang:master Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants