]> 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 07e4358d644c61fd4cb11a51d2180bef2f06aa91..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> {}
 
@@ -2837,7 +2842,7 @@ pub struct DrainFilter<'a, T, F>
     old_len: usize,
     /// The filter test predicate.
     pred: F,
-    /// A flag that indicates a panic has occured in the filter test prodicate.
+    /// A flag that indicates a panic has occurred in the filter test prodicate.
     /// This is used as a hint in the drop implmentation to prevent consumption
     /// of the remainder of the `DrainFilter`. Any unprocessed items will be
     /// backshifted in the `vec`, but no further items will be dropped or