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

Remove drain-on-drop behavior from DrainFilter #374

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Nov 15, 2022

This is a breaking change for hashbrown but not for std because in std the drain impl is still unstable.

This is part of stdlib ACP 136.

@the8472
Copy link
Member Author

the8472 commented Jan 15, 2023

The ACP has been approved so this should be ready to review.
Note that it'll need a bump to 0.14.

@the8472
Copy link
Member Author

the8472 commented Jan 17, 2023

Ah, I forgot that there was also a request to rename the API in std. So this could be made non-breaking in hashbrown by adding the new behavior under the new name and keeping the old impl.

@Amanieu
Copy link
Member

Amanieu commented Jan 22, 2023

I think it's fine to just make it a breaking change. I am planning to make a major version bump anyways.

@the8472 the8472 force-pushed the dont-drain-on-drop branch from 3f9a5a2 to 76fe28c Compare April 10, 2023 12:23
@the8472 the8472 force-pushed the dont-drain-on-drop branch from 76fe28c to a0ab1de Compare April 10, 2023 12:33
@the8472
Copy link
Member Author

the8472 commented Apr 10, 2023

Ready for review.

@Amanieu
Copy link
Member

Amanieu commented Apr 11, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 11, 2023

📌 Commit a0ab1de has been approved by Amanieu

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 11, 2023

⌛ Testing commit a0ab1de with merge 009969a...

@bors
Copy link
Contributor

bors commented Apr 11, 2023

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 009969a to master...

@bors bors merged commit 009969a into rust-lang:master Apr 11, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2023
Don't drain-on-drop in DrainFilter impls of various collections.

This removes drain-on-drop behavior from various unstable DrainFilter impls (not yet for HashSet/Map) because that behavior [is problematic](rust-lang#43244 (comment)) (because it can lead to panic-in-drop when user closures panic) and may become forbidden if [this draft RFC passes](rust-lang/rfcs#3288).

closes rust-lang#101122

[ACP](rust-lang/libs-team#136)

affected tracking issues
* rust-lang#43244
* rust-lang#70530
* rust-lang#59618

Related hashbrown update: rust-lang/hashbrown#374
oli-obk pushed a commit to oli-obk/miri that referenced this pull request Jun 15, 2023
Don't drain-on-drop in DrainFilter impls of various collections.

This removes drain-on-drop behavior from various unstable DrainFilter impls (not yet for HashSet/Map) because that behavior [is problematic](rust-lang/rust#43244 (comment)) (because it can lead to panic-in-drop when user closures panic) and may become forbidden if [this draft RFC passes](rust-lang/rfcs#3288).

closes #101122

[ACP](rust-lang/libs-team#136)

affected tracking issues
* #43244
* #70530
* #59618

Related hashbrown update: rust-lang/hashbrown#374
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request Aug 24, 2023
Don't drain-on-drop in DrainFilter impls of various collections.

This removes drain-on-drop behavior from various unstable DrainFilter impls (not yet for HashSet/Map) because that behavior [is problematic](rust-lang/rust#43244 (comment)) (because it can lead to panic-in-drop when user closures panic) and may become forbidden if [this draft RFC passes](rust-lang/rfcs#3288).

closes #101122

[ACP](rust-lang/libs-team#136)

affected tracking issues
* #43244
* #70530
* #59618

Related hashbrown update: rust-lang/hashbrown#374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants