@@ -454,6 +454,10 @@ impl String {
454454 ///
455455 /// [`new`]: String::new
456456 ///
457+ /// # Panics
458+ ///
459+ /// Panics if the capacity exceeds `isize::MAX` _bytes_.
460+ ///
457461 /// # Examples
458462 ///
459463 /// ```
@@ -1079,6 +1083,10 @@ impl String {
10791083
10801084 /// Appends a given string slice onto the end of this `String`.
10811085 ///
1086+ /// # Panics
1087+ ///
1088+ /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
1089+ ///
10821090 /// # Examples
10831091 ///
10841092 /// ```
@@ -1101,8 +1109,9 @@ impl String {
11011109 ///
11021110 /// # Panics
11031111 ///
1104- /// Panics if the range has `start_bound > end_bound`, or, if the range is
1105- /// bounded on either end and does not lie on a [`char`] boundary.
1112+ /// Panics if the range has `start_bound > end_bound`, if the range is
1113+ /// bounded on either end and does not lie on a [`char`] boundary, or if the
1114+ /// new capacity exceeds `isize::MAX` bytes.
11061115 ///
11071116 /// # Examples
11081117 ///
@@ -1158,7 +1167,7 @@ impl String {
11581167 ///
11591168 /// # Panics
11601169 ///
1161- /// Panics if the new capacity overflows [`usize`] .
1170+ /// Panics if the new capacity exceeds `isize::MAX` _bytes_ .
11621171 ///
11631172 /// # Examples
11641173 ///
@@ -1208,7 +1217,7 @@ impl String {
12081217 ///
12091218 /// # Panics
12101219 ///
1211- /// Panics if the new capacity overflows [`usize`] .
1220+ /// Panics if the new capacity exceeds `isize::MAX` _bytes_ .
12121221 ///
12131222 /// # Examples
12141223 ///
@@ -1372,6 +1381,10 @@ impl String {
13721381
13731382 /// Appends the given [`char`] to the end of this `String`.
13741383 ///
1384+ /// # Panics
1385+ ///
1386+ /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
1387+ ///
13751388 /// # Examples
13761389 ///
13771390 /// ```
0 commit comments