Skip to content

Commit 31c6d5f

Browse files
committed
Add liballoc doc panic detail according to RawVec
1 parent f315c35 commit 31c6d5f

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
///
@@ -249,9 +247,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
249247
///
250248
/// # Panics
251249
///
252-
/// * Panics if the requested capacity exceeds `usize::MAX` bytes.
253-
/// * Panics on 32-bit platforms if the requested capacity exceeds
254-
/// `isize::MAX` bytes.
250+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
255251
///
256252
/// # Aborts
257253
///
@@ -316,9 +312,7 @@ impl<T, A: AllocRef> RawVec<T, A> {
316312
///
317313
/// # Panics
318314
///
319-
/// * Panics if the requested capacity exceeds `usize::MAX` bytes.
320-
/// * Panics on 32-bit platforms if the requested capacity exceeds
321-
/// `isize::MAX` bytes.
315+
/// Panics if the new capacity exceeds `isize::MAX` bytes.
322316
///
323317
/// # Aborts
324318
///

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)