Skip to content

Commit

Permalink
Rollup merge of rust-lang#119374 - gurry:119149-improve-vec-docs, r=c…
Browse files Browse the repository at this point in the history
…uviper

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 rust-lang#119149
  • Loading branch information
matthiaskrgr authored Dec 29, 2023
2 parents b75ba15 + e3aca01 commit ef55e75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl<T, A: Allocator> RawVec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Aborts
///
Expand Down Expand Up @@ -342,7 +342,7 @@ impl<T, A: Allocator> RawVec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Aborts
///
Expand Down
12 changes: 6 additions & 6 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl<T> Vec<T> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down Expand Up @@ -633,7 +633,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down Expand Up @@ -896,7 +896,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down Expand Up @@ -926,7 +926,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down Expand Up @@ -1900,7 +1900,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down Expand Up @@ -2003,7 +2003,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// # Panics
///
/// Panics if the new capacity exceeds `isize::MAX` bytes.
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
///
/// # Examples
///
Expand Down

0 comments on commit ef55e75

Please sign in to comment.