]> git.lizzy.rs Git - rust.git/blobdiff - src/liballoc/vec.rs
Remove unchecked inline attribute, remove unused functions, make chache mod private...
[rust.git] / src / liballoc / vec.rs
index 3329a48b7c4594b2784bd8a0542e37a282de9a41..1a700b990569c39ac854f72150200a3131e64463 100644 (file)
@@ -629,6 +629,8 @@ pub fn shrink_to_fit(&mut self) {
     /// The capacity will remain at least as large as both the length
     /// and the supplied value.
     ///
+    /// # Panics
+    ///
     /// Panics if the current capacity is smaller than the supplied
     /// minimum capacity.
     ///
@@ -2701,6 +2703,9 @@ fn is_empty(&self) -> bool {
     }
 }
 
+#[unstable(feature = "trusted_len", issue = "37572")]
+unsafe impl<T> TrustedLen for Drain<'_, T> {}
+
 #[stable(feature = "fused", since = "1.26.0")]
 impl<T> FusedIterator for Drain<'_, T> {}