Skip to content

Conversation

Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Aug 3, 2025

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)

Closes: #65225

@rustbot
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
@ibraheemdev
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
@tgross35
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.)

@tgross35
Copy link
Contributor

tgross35 commented Sep 5, 2025

@rustbot label +I-libs-api-nominated
r? libs

@rustbot rustbot added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Sep 5, 2025
@rustbot rustbot assigned jhpratt and unassigned m-ou-se Sep 5, 2025
@tgross35 tgross35 added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Sep 5, 2025
@jhpratt
Copy link
Member

jhpratt commented Sep 7, 2025

r=me assuming someone from T-libs-api is fine with it. It's already passed FCP, but it was roughly a year ago. I see no reason this shouldn't be merged as a result.

cc @rust-lang/libs-api

@bors rollup

@jhpratt jhpratt added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-libs-api-nominated Nominated for discussion during a libs-api team meeting. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). 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
Development

Successfully merging this pull request may close these issues.

Tracking issue for #![feature(entry_insert)]
6 participants