Skip to content

Commit

Permalink
Unrolled build for rust-lang#133530
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133530 - timvisee:master, r=jhpratt

Use consistent wording in docs, use is zero instead of is 0

In documentation, wording of _"`rhs` is zero"_ and _"`rhs` is 0"_ is intermixed. This is especially visible [here](https://doc.rust-lang.org/std/primitive.usize.html#method.div_ceil).

This changes all occurrences to _"`rhs` is zero"_ for better readability.
  • Loading branch information
rust-timer authored Nov 29, 2024
2 parents 5bbbc09 + 89b20e9 commit df62865
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
///
/// The binary heap will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
///
/// # Examples
///
Expand Down Expand Up @@ -496,7 +496,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
///
/// The binary heap will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
///
/// # Examples
///
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl<T> Vec<T> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// It is important to note that although the returned vector has the
/// minimum *capacity* specified, the vector will have a zero *length*. For
Expand Down Expand Up @@ -487,7 +487,7 @@ impl<T> Vec<T> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// # Errors
///
Expand Down Expand Up @@ -745,7 +745,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// It is important to note that although the returned vector has the
/// minimum *capacity* specified, the vector will have a zero *length*. For
Expand Down Expand Up @@ -808,7 +808,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// # Errors
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ pub trait Iterator {
///
/// # Panics
///
/// Panics if `N` is 0. This check will most probably get changed to a
/// Panics if `N` is zero. This check will most probably get changed to a
/// compile time error before this method gets stabilized.
///
/// ```should_panic
Expand Down Expand Up @@ -3454,7 +3454,7 @@ pub trait Iterator {
///
/// # Panics
///
/// Panics if `N` is 0.
/// Panics if `N` is zero.
///
/// # Examples
///
Expand Down
26 changes: 13 additions & 13 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -1986,7 +1986,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2014,7 +2014,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2042,7 +2042,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand All @@ -2069,7 +2069,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2526,7 +2526,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2557,7 +2557,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2588,7 +2588,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2619,7 +2619,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2887,7 +2887,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -2926,7 +2926,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN` and
/// `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -2975,7 +2975,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -3019,7 +3019,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down
22 changes: 11 additions & 11 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2034,7 +2034,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2063,7 +2063,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2091,7 +2091,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2121,7 +2121,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2545,7 +2545,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2576,7 +2576,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2604,7 +2604,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2635,7 +2635,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2872,7 +2872,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2900,7 +2900,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down
Loading

0 comments on commit df62865

Please sign in to comment.