Skip to content

Conversation

@cuviper
Copy link
Member

@cuviper cuviper commented Nov 14, 2024

This matches the recently-stabilized methods on HashMap entries. I've
reused tracking issue #65225 for now, but we may want to split it.

@rustbot
Copy link
Collaborator

rustbot commented Nov 14, 2024

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 Nov 14, 2024
This matches the recently-stabilized methods on `HashMap` entries. I've
reused tracking issue rust-lang#65225 for now, but we may want to split it.
@cuviper cuviper force-pushed the btreemap-insert_entry branch from 6f682b6 to 584ec95 Compare November 14, 2024 19:42
@ibraheemdev
Copy link
Member

r? libs-api for new unstable API surface

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Nov 15, 2024
@rustbot rustbot assigned Amanieu and unassigned ibraheemdev Nov 15, 2024
@cuviper
Copy link
Member Author

cuviper commented Nov 16, 2024

FWIW, I'm also working on a BTreeSet entry API to match HashSet's, and insert_entry will come in handy. I could still create and use that internally, but I don't see why we shouldn't expose it publicly as well.

@Amanieu
Copy link
Member

Amanieu commented Nov 25, 2024

Not 100% sure about the lifetime magic in the BTreeMap internals, but if it passes Miri then it's probably fine.

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 25, 2024

📌 Commit 584ec95 has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2024
@cuviper
Copy link
Member Author

cuviper commented Nov 25, 2024

Not 100% sure about the lifetime magic in the BTreeMap internals, but if it passes Miri then it's probably fine.

Yeah, it's hairy, but it does pass Miri for me. I hope that coverage is good enough, given that I also modified VacantEntry::insert to use the new code, and that's used by the main BTreeMap::insert too.

@bors bors merged commit 5915190 into rust-lang:master Nov 27, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 27, 2024
@cuviper cuviper deleted the btreemap-insert_entry branch November 27, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants