about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-29 04:06:38 +0000
committerbors <bors@rust-lang.org>2021-01-29 04:06:38 +0000
commitc6bc46227ab57a844fc7a9ed3a6c9efb35c725a9 (patch)
tree44f92f1c988abb8d45550c038a8e7f3c1923ebbb /compiler/rustc_interface/src
parent74500b99783d126e330184f0392a78f8b93b73ef (diff)
parent417eefedfa4554d1417994a67186dd6a0a720aa8 (diff)
downloadrust-c6bc46227ab57a844fc7a9ed3a6c9efb35c725a9.tar.gz
rust-c6bc46227ab57a844fc7a9ed3a6c9efb35c725a9.zip
Auto merge of #81073 - ssomers:btree_owned_root_vs_dying, r=Mark-Simulacrum
BTreeMap: prevent tree from ever being owned by non-root node

This introduces a new marker type, `Dying`, which is used to note trees which are in the process of deallocation. On such trees, some fields may be in an inconsistent state as we are deallocating the tree. Unfortunately, there's not a great way to express conditional unsafety, so the methods for traversal can cause UB if not invoked correctly, but not marked as such. This is not a regression from the previous state, but rather isolates the destructive methods to solely being called on the dying state.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions