]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #87696 - ssomers:btree_lazy_iterator_cleanup, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Mon, 16 Aug 2021 03:45:26 +0000 (03:45 +0000)
committerbors <bors@rust-lang.org>
Mon, 16 Aug 2021 03:45:26 +0000 (03:45 +0000)
commit23461b210f1b0a121592a18fc4fb666106006668
treec24c80d60ca3bbbe7812eef1a387e440a1d0e905
parent2a6fb9a4c0e5ca7a81999065943b211c226fe9d8
parent7b28036c63245477ff6c2033da336302bfca770e
Auto merge of #87696 - ssomers:btree_lazy_iterator_cleanup, r=Mark-Simulacrum

BTree: merge the complication introduced by #81486 and #86031

Also:
- Deallocate the last few tree nodes as soon as an `into_iter` iterator steps beyond the end, instead of waiting around for the drop of the iterator (just to share more code).
- Symmetric code for backward iteration.
- Mark unsafe the methods on dying handles, modelling dying handles after raw pointers: it's the caller's responsibility to use them safely.

r? `@Mark-Simulacrum`