Skip to content

Commit ef55e75

Browse files
authored
Rollup merge of #119374 - gurry:119149-improve-vec-docs, r=cuviper
Italicise "bytes" in the docs of some `Vec` methods On a cursory read it's easy to miss that the limit is in terms of bytes not no. of elements. The italics should help with that. Fixes #119149
2 parents b75ba15 + e3aca01 commit ef55e75

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

library/alloc/src/raw_vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl<T, A: Allocator> RawVec<T, A> {
284284
///
285285
/// # Panics
286286
///
287-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
287+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
288288
///
289289
/// # Aborts
290290
///
@@ -342,7 +342,7 @@ impl<T, A: Allocator> RawVec<T, A> {
342342
///
343343
/// # Panics
344344
///
345-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
345+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
346346
///
347347
/// # Aborts
348348
///

library/alloc/src/vec/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl<T> Vec<T> {
445445
///
446446
/// # Panics
447447
///
448-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
448+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
449449
///
450450
/// # Examples
451451
///
@@ -633,7 +633,7 @@ impl<T, A: Allocator> Vec<T, A> {
633633
///
634634
/// # Panics
635635
///
636-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
636+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
637637
///
638638
/// # Examples
639639
///
@@ -896,7 +896,7 @@ impl<T, A: Allocator> Vec<T, A> {
896896
///
897897
/// # Panics
898898
///
899-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
899+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
900900
///
901901
/// # Examples
902902
///
@@ -926,7 +926,7 @@ impl<T, A: Allocator> Vec<T, A> {
926926
///
927927
/// # Panics
928928
///
929-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
929+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
930930
///
931931
/// # Examples
932932
///
@@ -1900,7 +1900,7 @@ impl<T, A: Allocator> Vec<T, A> {
19001900
///
19011901
/// # Panics
19021902
///
1903-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
1903+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
19041904
///
19051905
/// # Examples
19061906
///
@@ -2003,7 +2003,7 @@ impl<T, A: Allocator> Vec<T, A> {
20032003
///
20042004
/// # Panics
20052005
///
2006-
/// Panics if the new capacity exceeds `isize::MAX` bytes.
2006+
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
20072007
///
20082008
/// # Examples
20092009
///

0 commit comments

Comments
 (0)