-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement cursors for BTreeMap #105641
Implement cursors for BTreeMap #105641
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
6b77680
to
df24100
Compare
@rustbot label +T-libs-api -T-libs +S-waiting-on-ACP -S-waiting-on-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after adding a tracking issue.
This is a prerequisite for cursor support for `BTreeMap`.
Added tracking issue #107540 r=m-ou-se |
Does this need an explicit bors r+? (Not sure how Bors interacts with GitHub reviews, if at all.) |
@bors r=m-ou-se |
Implement cursors for BTreeMap See the ACP for an overview of the API: rust-lang/libs-team#141 The implementation is split into 2 commits: - The first changes the internal insertion functions to return a handle to the newly inserted element. The lifetimes involved are a bit hairy since we need a mutable handle to both the `BTreeMap` itself (which holds the root) and the nodes allocated in memory. I have tested that this passes the standard library testsuite under miri. - The second commit implements the cursor API itself. This is more straightforward to follow but still involves some unsafe code to deal with simultaneous mutable borrows of the tree root and the node that is currently being iterated.
Implement cursors for BTreeMap See the ACP for an overview of the API: rust-lang/libs-team#141 The implementation is split into 2 commits: - The first changes the internal insertion functions to return a handle to the newly inserted element. The lifetimes involved are a bit hairy since we need a mutable handle to both the `BTreeMap` itself (which holds the root) and the nodes allocated in memory. I have tested that this passes the standard library testsuite under miri. - The second commit implements the cursor API itself. This is more straightforward to follow but still involves some unsafe code to deal with simultaneous mutable borrows of the tree root and the node that is currently being iterated.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#105641 (Implement cursors for BTreeMap) - rust-lang#107271 (Treat Drop as a rmw operation) - rust-lang#107710 (Update strip-ansi-escapes and vte) - rust-lang#107758 (Change `arena_cache` to not alter the declared query result) - rust-lang#107777 (Make `derive_const` derive properly const-if-const impls) - rust-lang#107780 (Rename `replace_bound_vars_with_*` to `instantiate_binder_with_*`) - rust-lang#107793 (Add missing tracking issue for `RawOsError`) - rust-lang#107807 (Fix small debug typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
See the ACP for an overview of the API: rust-lang/libs-team#141
The implementation is split into 2 commits:
BTreeMap
itself (which holds the root) and the nodes allocated in memory. I have tested that this passes the standard library testsuite under miri.