Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stabilize btree_entry_insert feature #144871

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

Open
Kivooeo wants to merge 1 commit into rust-lang:master
base: master
Choose a base branch
Loading
from Kivooeo:btree_entry_insert-stabilize

Conversation

Copy link
Member

@Kivooeo Kivooeo commented Aug 3, 2025
edited by tgross35
Loading

This stabilises btree_map::VacantEntry::insert_entry and btree_map::Entry::insert_entry, following the FCP in tracking issue.

New stable API:

impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
 pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>;
}
impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
 pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A>;
}

(FCP ended almost a year ago, so if it's needed for process we could rerun it)

joseluis reacted with eyes emoji
Copy link
Collaborator

rustbot commented Aug 3, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 3, 2025
Copy link
Member

r? libs-api because it's been a while since the FCP.

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Aug 5, 2025
@rustbot rustbot assigned m-ou-se and unassigned ibraheemdev Aug 5, 2025
Copy link
Contributor

tgross35 commented Sep 3, 2025

I haven't looked but it's worth a sanity check if the concerns that caused HashMap::insert_entry to be destabilized also apply to BTreeMap #90345 (comment). (It was eventually stabilized after #44286 went through FCP to reject.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /