diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 67ebdcc9f33b..b2cf98a5de67 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -80,9 +80,7 @@ pub const fn new() -> Self { /// /// # Panics /// - /// * Panics if the requested capacity exceeds `usize::MAX` bytes. - /// * Panics on 32-bit platforms if the requested capacity exceeds - /// `isize::MAX` bytes. + /// Panics if the requested capacity exceeds `isize::MAX` bytes. /// /// # Aborts /// @@ -251,9 +249,7 @@ fn current_memory(&self) -> Option<(NonNull, Layout)> { /// /// # Panics /// - /// * Panics if the requested capacity exceeds `usize::MAX` bytes. - /// * Panics on 32-bit platforms if the requested capacity exceeds - /// `isize::MAX` bytes. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Aborts /// @@ -318,9 +314,7 @@ pub fn try_reserve(&mut self, len: usize, additional: usize) -> Result<(), TryRe /// /// # Panics /// - /// * Panics if the requested capacity exceeds `usize::MAX` bytes. - /// * Panics on 32-bit platforms if the requested capacity exceeds - /// `isize::MAX` bytes. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Aborts /// diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index c2cf64393adf..5db96a504a6a 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -491,7 +491,7 @@ pub fn capacity(&self) -> usize { /// /// # Panics /// - /// Panics if the new capacity overflows `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples /// @@ -1188,7 +1188,7 @@ pub fn dedup_by(&mut self, same_bucket: F) /// /// # Panics /// - /// Panics if the number of elements in the vector overflows a `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples ///