diff options
| author | Ivan Tham <pickfire@riseup.net> | 2020-06-16 12:23:28 +0800 |
|---|---|---|
| committer | Ivan Tham <pickfire@riseup.net> | 2020-06-27 00:08:14 +0800 |
| commit | 31c6d5f35e3357d55411ba2057101a854d229d8a (patch) | |
| tree | de4d1b90351a90adf75053da9879c923104d64e2 | |
| parent | f315c35a77e40bd11ce81fedc0556be0f410bbf4 (diff) | |
| download | rust-31c6d5f35e3357d55411ba2057101a854d229d8a.tar.gz rust-31c6d5f35e3357d55411ba2057101a854d229d8a.zip | |
Add liballoc doc panic detail according to RawVec
| -rw-r--r-- | src/liballoc/raw_vec.rs | 12 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 805dbfe2775..49dcbe70672 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -80,9 +80,7 @@ impl<T> RawVec<T, Global> { /// /// # 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 /// @@ -249,9 +247,7 @@ impl<T, A: AllocRef> RawVec<T, A> { /// /// # 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 /// @@ -316,9 +312,7 @@ impl<T, A: AllocRef> RawVec<T, A> { /// /// # 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 06462fd96d9..861ee31c694 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -491,7 +491,7 @@ impl<T> Vec<T> { /// /// # Panics /// - /// Panics if the new capacity overflows `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples /// @@ -1188,7 +1188,7 @@ impl<T> Vec<T> { /// /// # Panics /// - /// Panics if the number of elements in the vector overflows a `usize`. + /// Panics if the new capacity exceeds `isize::MAX` bytes. /// /// # Examples /// |
