Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ macro_rules! int_impl {
}
}

/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.
///
/// If `rhs` is larger or equal to the number of bits in `self`,
/// the entire value is shifted out, and `0` is returned.
Expand Down Expand Up @@ -1423,7 +1423,7 @@ macro_rules! int_impl {
}
}

/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.
///
/// If `rhs` is larger or equal to the number of bits in `self`,
/// the entire value is shifted out, which yields `0` for a positive number,
Expand Down Expand Up @@ -2389,7 +2389,7 @@ macro_rules! int_impl {
(res, overflowed ^ (rhs < 0))
}

/// Calculates `self` - `rhs`
/// Calculates `self` - `rhs`.
///
/// Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow
/// would occur. If an overflow would have occurred then the wrapped value is returned.
Expand Down Expand Up @@ -2470,7 +2470,7 @@ macro_rules! int_impl {
(c, b != d)
}

/// Calculates `self` - `rhs` with an unsigned `rhs`
/// Calculates `self` - `rhs` with an unsigned `rhs`.
///
/// Returns a tuple of the subtraction along with a boolean indicating
/// whether an arithmetic overflow would occur. If an overflow would
Expand Down
24 changes: 12 additions & 12 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ macro_rules! uint_impl {
}
}

/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.
///
/// If `rhs` is larger or equal to the number of bits in `self`,
/// the entire value is shifted out, and `0` is returned.
Expand Down Expand Up @@ -1613,7 +1613,7 @@ macro_rules! uint_impl {
}
}

/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`
/// Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.
///
/// If `rhs` is larger or equal to the number of bits in `self`,
/// the entire value is shifted out, and `0` is returned.
Expand Down Expand Up @@ -2222,7 +2222,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));")]
Expand Down Expand Up @@ -2312,15 +2312,15 @@ macro_rules! uint_impl {
(res, overflowed ^ (rhs < 0))
}

/// Calculates `self` - `rhs`
/// Calculates `self` - `rhs`.
///
/// Returns a tuple of the subtraction along with a boolean indicating
/// whether an arithmetic overflow would occur. If an overflow would
/// have occurred then the wrapped value is returned.
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_sub(2), (3, false));")]
Expand Down Expand Up @@ -2447,7 +2447,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div(2), (2, false));")]
Expand Down Expand Up @@ -2478,7 +2478,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div_euclid(2), (2, false));")]
Expand Down Expand Up @@ -2506,7 +2506,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem(2), (1, false));")]
Expand Down Expand Up @@ -2537,7 +2537,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false));")]
Expand All @@ -2561,7 +2561,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".overflowing_neg(), (0, false));")]
Expand All @@ -2586,7 +2586,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(4), (0x10, false));")]
Expand All @@ -2612,7 +2612,7 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(4), (0x1, false));")]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ impl str {
///
/// # Examples
///
/// Basic usage
/// Basic usage:
///
/// ```
/// let four: u32 = "4".parse().unwrap();
Expand Down
Loading