about summary refs log tree commit diff
path: root/src/liballoc/collections/btree/node.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-02-13 17:13:50 +0100
committerRalf Jung <post@ralfj.de>2019-02-13 17:25:41 +0100
commitf0bef49cf10c19b72b7d025aedb407ab5745c365 (patch)
treee3dd44ac1a197af11b52b2234abcb9f1d3e2b094 /src/liballoc/collections/btree/node.rs
parentd87df696b1811dc6da6a0be1d90b4398a67eb87e (diff)
downloadrust-f0bef49cf10c19b72b7d025aedb407ab5745c365.tar.gz
rust-f0bef49cf10c19b72b7d025aedb407ab5745c365.zip
fix invalidating references in BTree iterators
Diffstat (limited to 'src/liballoc/collections/btree/node.rs')
-rw-r--r--src/liballoc/collections/btree/node.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs
index cb38e6470ab..1cdf4fdd2db 100644
--- a/src/liballoc/collections/btree/node.rs
+++ b/src/liballoc/collections/btree/node.rs
@@ -675,7 +675,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
         // invalidates the reference returned by the first.
         // More precisely, it is the call to `len` that is the culprit,
         // because that creates a shared reference to the header, which *can*
-        // overlap with the keys.
+        // overlap with the keys (and even the values, for ZST keys).
         unsafe {
             let len = self.len();
             let leaf = self.as_leaf_mut();