Skip to content

Commit 0ca7f74

Browse files
committed
Auto merge of #73391 - pickfire:liballoc-panic-doc, r=Mark-Simulacrum
Add liballoc doc panic detail according to RawVec
2 parents c86039b + 31c6d5f commit 0ca7f74

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/liballoc/raw_vec.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ impl<T> RawVec<T, Global> {
8080
///
8181
/// # Panics
8282
///
83-
/// * Panics if the requested capacity exceeds `usize::MAX` bytes.
84-
/// * Panics on 32-bit platforms if the requested capacity exceeds
85-
/// `isize::MAX` bytes.
83+
/// Panics if the requested capacity exceeds `isize::MAX` bytes.
8684
///
8785
/// # Aborts
8886
///
@@ -251,9 +249,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
251249
///
252250
/// # Panics
253251
///
254-
/// * Panics if the requested capacity exceeds `usize::MAX` bytes.
255-
/// * Panics on 32-bit platforms if the requested capacity exceeds
256-
/// `isize::MAX` bytes.
252+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
257253
///
258254
/// # Aborts
259255
///
@@ -318,9 +314,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
318314
///
319315
/// # Panics
320316
///
321-
/// * Panics if the requested capacity exceeds `usize::MAX` bytes.
322-
/// * Panics on 32-bit platforms if the requested capacity exceeds
323-
/// `isize::MAX` bytes.
317+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
324318
///
325319
/// # Aborts
326320
///

src/liballoc/vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ impl<T> Vec<T> {
491491
///
492492
/// # Panics
493493
///
494-
/// Panics if the new capacity overflows `usize`.
494+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
495495
///
496496
/// # Examples
497497
///
@@ -1188,7 +1188,7 @@ impl<T> Vec<T> {
11881188
///
11891189
/// # Panics
11901190
///
1191-
/// Panics if the number of elements in the vector overflows a `usize`.
1191+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
11921192
///
11931193
/// # Examples
11941194
///

0 commit comments

Comments
 (0)