]> git.proxmox.com Git - rustc.git/blobdiff - library/alloc/src/collections/btree/mod.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / library / alloc / src / collections / btree / mod.rs
index 6c8a588eb58f33db5d98c32d2f53f2cb7695d80a..ecbdacda4b618cd510ab5330f3cffe7c502ea979 100644 (file)
@@ -1,3 +1,4 @@
+mod borrow;
 pub mod map;
 mod navigate;
 mod node;
@@ -13,6 +14,9 @@ trait Recover<Q: ?Sized> {
     fn replace(&mut self, key: Self::Key) -> Option<Self::Key>;
 }
 
+/// Same purpose as `Option::unwrap` but doesn't always guarantee a panic
+/// if the option contains no value.
+/// SAFETY: the caller must ensure that the option contains a value.
 #[inline(always)]
 pub unsafe fn unwrap_unchecked<T>(val: Option<T>) -> T {
     val.unwrap_or_else(|| {