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

[manual_retain]: add lint case for binary_heap #11329

Merged
merged 2 commits into from Aug 13, 2023

Conversation

unvalley
Copy link
Contributor

@unvalley unvalley commented Aug 12, 2023

Closes #9059

This PR adds changes to perform linting on the binary_heap as well, under the manual_retain rule.

changelog: [manual_retain]: update for lint binary_heap

@rustbot
Copy link
Collaborator

rustbot commented Aug 12, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 12, 2023
refactor: rename variable

chore: reorder

test: update naming for msrv
@unvalley unvalley marked this pull request as ready for review August 13, 2023 08:22
Comment on lines 227 to 231
#[clippy::msrv = "1.70"]
fn _msrv_170() {
let mut binary_heap = BinaryHeap::from([1, 2, 3]);
binary_heap = binary_heap.into_iter().filter(|x| x % 2 == 0).collect();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 1.69 to test that it isn't applied when the MSRV is below BinaryHeap::retain's introduction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I updated it at 1eff39d

@Alexendoo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 13, 2023

📌 Commit 1eff39d has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 13, 2023

⌛ Testing commit 1eff39d with merge 344ae11...

@bors
Copy link
Collaborator

bors commented Aug 13, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 344ae11 to master...

@bors bors merged commit 344ae11 into rust-lang:master Aug 13, 2023
5 checks passed
@unvalley unvalley deleted the lint-binary-heap-retain branch August 13, 2023 15:50
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.

want to lint binary_heap in manual_retain when API is stabilized
4 participants