Add Range parameter to BTreeMap::extract_if and BTreeSet::extract_if#140825
Merged
bors merged 4 commits intorust-lang:masterfrom May 31, 2025
Merged
Add Range parameter to BTreeMap::extract_if and BTreeSet::extract_if#140825bors merged 4 commits intorust-lang:masterfrom
BTreeMap::extract_if and BTreeSet::extract_if#140825bors merged 4 commits intorust-lang:masterfrom
Conversation
Collaborator
|
rustbot has assigned @workingjubilee. Use |
Collaborator
|
The Miri subtree was changed cc @rust-lang/miri |
Collaborator
|
☔ The latest upstream changes (presumably #141529) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
This change was requested in the btree_extract_if tracking issue: rust-lang#70530 (comment)
Contributor
Author
|
@workingjubilee, would you be able to take a look (and maybe redirect to the right place)? |
Member
|
Ah, yeah, looks good to me. @bors r+ rollup |
Collaborator
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
May 30, 2025
Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if` This new parameter was requested in the btree_extract_if tracking issue: rust-lang#70530 (comment) I attempted to follow the style used by `Vec::extract_if`. Before: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A> where K: Ord, F: FnMut(&K, &mut V) -> bool; } ``` After: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A> where K: Ord, R: RangeBounds<K>, F: FnMut(&K, &mut V) -> bool; } ``` Related: rust-lang#70530 — While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.
This was referenced May 30, 2025
bors
added a commit
that referenced
this pull request
May 30, 2025
Rollup of 8 pull requests Successful merges: - #140825 (Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if`) - #141077 (Fix the issue of typo of comma in arm parsing) - #141237 (Implement ((un)checked_)exact_div methods for integers) - #141494 (mir-opt: Do not transform non-int type in match_branches) - #141609 (core: begin deduplicating pointer docs) - #141768 (ci: use arm to calculate job matrix) - #141771 (Increase timeout for new bors try builds) - #141781 (Fix spans for unsafe binders) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
May 31, 2025
Rollup merge of #140825 - rs-sac:ext, r=workingjubilee Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if` This new parameter was requested in the btree_extract_if tracking issue: #70530 (comment) I attempted to follow the style used by `Vec::extract_if`. Before: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A> where K: Ord, F: FnMut(&K, &mut V) -> bool; } ``` After: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A> where K: Ord, R: RangeBounds<K>, F: FnMut(&K, &mut V) -> bool; } ``` Related: #70530 — While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
May 31, 2025
Rollup of 8 pull requests Successful merges: - rust-lang/rust#140825 (Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if`) - rust-lang/rust#141077 (Fix the issue of typo of comma in arm parsing) - rust-lang/rust#141237 (Implement ((un)checked_)exact_div methods for integers) - rust-lang/rust#141494 (mir-opt: Do not transform non-int type in match_branches) - rust-lang/rust#141609 (core: begin deduplicating pointer docs) - rust-lang/rust#141768 (ci: use arm to calculate job matrix) - rust-lang/rust#141771 (Increase timeout for new bors try builds) - rust-lang/rust#141781 (Fix spans for unsafe binders) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Jun 3, 2025
Add Range parameter to `BTreeMap::extract_if` and `BTreeSet::extract_if` This new parameter was requested in the btree_extract_if tracking issue: rust-lang#70530 (comment) I attempted to follow the style used by `Vec::extract_if`. Before: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A> where K: Ord, F: FnMut(&K, &mut V) -> bool; } ``` After: ```rust impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> { #[unstable(feature = "btree_extract_if", issue = "70530")] pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A> where K: Ord, R: RangeBounds<K>, F: FnMut(&K, &mut V) -> bool; } ``` Related: rust-lang#70530 — While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This new parameter was requested in the btree_extract_if tracking issue: #70530 (comment)
I attempted to follow the style used by
Vec::extract_if.Before:
After:
Related: #70530
—
While I believe I have adjusted all of the necessary bits, as this is my first attempt to contribute to Rust, I may have overlooked something out of ignorance, but if you can point out any oversight, I shall attempt to remedy it.