70c5f6efc4
BTreeMap: introduce marker::ValMut and reserve Mut for unique access The mutable BTreeMap iterators (apart from `DrainFilter`) are double-ended, meaning they have to rely on a front and a back handle that each represent a reference into the tree. Reserve a type category `marker::ValMut` for them, so that we guarantee that they cannot reach operations on handles with borrow type `marker::Mut`and that these operations can assume unique access to the tree. Including #75195, benchmarks report no genuine change: ``` benchcmp old new --threshold 5 name old ns/iter new ns/iter diff ns/iter diff % speedup btree::map::iter_100 3,333 3,023 -310 -9.30% x 1.10 btree::map::range_unbounded_vs_iter 36,624 31,569 -5,055 -13.80% x 1.16 ``` r? @Mark-Simulacrum |
||
---|---|---|
.. | ||
alloc | ||
collections | ||
prelude | ||
raw_vec | ||
rc | ||
sync | ||
alloc.rs | ||
borrow.rs | ||
boxed.rs | ||
fmt.rs | ||
lib.rs | ||
macros.rs | ||
raw_vec.rs | ||
rc.rs | ||
slice.rs | ||
str.rs | ||
string.rs | ||
sync.rs | ||
task.rs | ||
tests.rs | ||
vec.rs |