]> git.lizzy.rs Git - rust.git/blobdiff - library/alloc/src/collections/btree/map.rs
BTreeSet->BTreeMap (fix copy/paste mistake in documentation)
[rust.git] / library / alloc / src / collections / btree / map.rs
index 264c217c9ef235faa2e96b2b5e485f868a84f3d7..6027991a0ed2fbb9b1e518ba7e937e6fde87ddae 100644 (file)
@@ -64,9 +64,9 @@
 /// It is a logic error for a key to be modified in such a way that the key's ordering relative to
 /// any other key, as determined by the [`Ord`] trait, changes while it is in the map. This is
 /// normally only possible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.
-/// The behavior resulting from such a logic error is not specified (it could include panics,
-/// incorrect results, aborts, memory leaks, or non-termination) but will not be undefined
-/// behavior.
+/// The behavior resulting from such a logic error is not specified, but will be encapsulated to the
+/// `BTreeMap` that observed the logic error and not result in undefined behavior. This could
+/// include panics, incorrect results, aborts, memory leaks, and non-termination.
 ///
 /// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::values`], or
 /// [`BTreeMap::keys`] produce their items in order by key, and take worst-case logarithmic and