Auto merge of #73391 - pickfire:liballoc-panic-doc, r=Mark-Simulacrum

Add liballoc doc panic detail according to RawVec
This commit is contained in:
bors
2020-06-29 12:00:31 +00:00
2 changed files with 5 additions and 11 deletions
+3 -9
View File
@@ -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<u8>, 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
///
+2 -2
View File
@@ -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<F>(&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
///