Open
Description
This issue is about the "public" API of module alloc/src/collections/btree/node.rs
. (The module itself is not public.)
I don't know how serious people are about pursuing strong static typing for this API, but depending on that, I think both dormant
functions (on NodeRef and on Handle) should be marked as unsafe
: the very existence of a dormant NodeRef/Handle is unsafe because it can be turned into a NodeRef<Immut<'a>, ...>
using non-unsafe
method reborrow
and then inspected arbitrarily, which may cause races, aliasing rules violations, etc. with concurrent use of a NodeRef<Mut<'a>, ...>
existing at the same time.