about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorBart Jacobs <bart.jacobs@cs.kuleuven.be>2025-01-29 08:35:29 +0100
committerGitHub <noreply@github.com>2025-01-29 08:35:29 +0100
commit810e4c1bc62a4801a4c29fe6c975630acbd78370 (patch)
tree0a51cedb03d5cf83db8a86f01cb9b370655b843c /library/alloc/src
parent6763561161dff2419ffe9795ec8bc40671c16e9e (diff)
downloadrust-810e4c1bc62a4801a4c29fe6c975630acbd78370.tar.gz
rust-810e4c1bc62a4801a4c29fe6c975630acbd78370.zip
btree/node.rs: pop_internal_level: does not invalidate other handles
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/collections/btree/node.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/collections/btree/node.rs b/library/alloc/src/collections/btree/node.rs
index 2525f5856cd..37f784a322c 100644
--- a/library/alloc/src/collections/btree/node.rs
+++ b/library/alloc/src/collections/btree/node.rs
@@ -600,6 +600,9 @@ impl<K, V> NodeRef<marker::Owned, K, V, marker::LeafOrInternal> {
     /// no cleanup is done on any of the keys, values and other children.
     /// This decreases the height by 1 and is the opposite of `push_internal_level`.
     ///
+    /// Does not invalidate any handles or references pointing into the subtree
+    /// rooted at the first child of `self`.
+    ///
     /// Panics if there is no internal level, i.e., if the root node is a leaf.
     pub(super) fn pop_internal_level<A: Allocator + Clone>(&mut self, alloc: A) {
         assert!(self.height > 0);