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
46 changes: 23 additions & 23 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ macro_rules! int_impl {
/// This function will always panic on overflow, regardless of whether overflow checks are enabled.
///
/// The only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where
/// `MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// [`MIN`](Self::MIN) is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// that is too large to represent in the type.
///
/// # Examples
Expand Down Expand Up @@ -1050,7 +1050,7 @@ macro_rules! int_impl {
/// This function will always panic on overflow, regardless of whether overflow checks are enabled.
///
/// The only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where
/// `MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// [`MIN`](Self::MIN) is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// that is too large to represent in the type.
///
/// # Examples
Expand Down Expand Up @@ -1223,7 +1223,7 @@ macro_rules! int_impl {
/// This function will always panic on overflow, regardless of whether overflow checks are enabled.
///
/// The only case where such an overflow can occur is `x % y` for `MIN / -1` on a
/// signed type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.
/// signed type (where [`MIN`](Self::MIN) is the negative minimal value), which is invalid due to implementation artifacts.
///
/// # Examples
///
Expand Down Expand Up @@ -1289,7 +1289,7 @@ macro_rules! int_impl {
/// This function will always panic on overflow, regardless of whether overflow checks are enabled.
///
/// The only case where such an overflow can occur is `x % y` for `MIN / -1` on a
/// signed type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.
/// signed type (where [`MIN`](Self::MIN) is the negative minimal value), which is invalid due to implementation artifacts.
///
/// # Examples
///
Expand Down Expand Up @@ -2259,8 +2259,8 @@ macro_rules! int_impl {
/// boundary of the type.
///
/// The only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where
/// `MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// that is too large to represent in the type. In such a case, this function returns `MIN` itself.
/// [`MIN`](Self::MIN) is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
/// that is too large to represent in the type. In such a case, this function returns [`MIN`](Self::MIN) itself.
///
/// # Panics
///
Expand All @@ -2284,9 +2284,9 @@ macro_rules! int_impl {
/// Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,
/// wrapping around at the boundary of the type.
///
/// Wrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value
/// Wrapping will only occur in `MIN / -1` on a signed type (where [`MIN`](Self::MIN) is the negative minimal value
/// for the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the
/// type. In this case, this method returns `MIN` itself.
/// type. In this case, this method returns [`MIN`](Self::MIN) itself.
///
/// # Panics
///
Expand All @@ -2311,7 +2311,7 @@ macro_rules! int_impl {
/// boundary of the type.
///
/// Such wrap-around never actually occurs mathematically; implementation artifacts make `x % y`
/// invalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,
/// invalid for `MIN / -1` on a signed type (where [`MIN`](Self::MIN) is the negative minimal value). In such a case,
/// this function returns `0`.
///
/// # Panics
Expand All @@ -2336,8 +2336,8 @@ macro_rules! int_impl {
/// Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around
/// at the boundary of the type.
///
/// Wrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value
/// for the type). In this case, this method returns 0.
/// Wrapping will only occur in `MIN % -1` on a signed type (where [`MIN`](Self::MIN) is
/// the negative minimal value for the type). In this case, this method returns 0.
///
/// # Panics
///
Expand All @@ -2361,9 +2361,9 @@ macro_rules! int_impl {
/// Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary
/// of the type.
///
/// The only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`
/// The only case where such wrapping can occur is when one negates [`MIN`](Self::MIN) on a signed type (where [`MIN`](Self::MIN)
/// is the negative minimal value for the type); this is a positive value that is too large to represent
/// in the type. In such a case, this function returns `MIN` itself.
/// in the type. In such a case, this function returns [`MIN`](Self::MIN) itself.
///
/// # Examples
///
Expand Down Expand Up @@ -2460,7 +2460,7 @@ macro_rules! int_impl {
///
/// The only case where such wrapping can occur is when one takes the absolute value of the negative
/// minimal value for the type; this is a positive value that is too large to represent in the type. In
/// such a case, this function returns `MIN` itself.
/// such a case, this function returns [`MIN`](Self::MIN) itself.
///
/// # Examples
///
Expand Down Expand Up @@ -2772,7 +2772,7 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Please note that this example is shared among integer types, which is why `i32` is used.
/// Please note that this example is shared among integer types, which is why [`i32`] is used.
///
/// ```
/// #![feature(signed_bigint_helpers)]
Expand Down Expand Up @@ -2950,7 +2950,7 @@ macro_rules! int_impl {
/// Negates self, overflowing if this is equal to the minimum value.
///
/// Returns a tuple of the negated version of self along with a boolean indicating whether an overflow
/// happened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the
/// happened. If `self` is the minimum value (e.g., [`i32::MIN`] for values of type [`i32`]), then the
/// minimum value will be returned again and `true` will be returned for an overflow happening.
///
/// # Examples
Expand Down Expand Up @@ -3020,7 +3020,7 @@ macro_rules! int_impl {
///
/// Returns a tuple of the absolute version of self along with a boolean indicating whether an overflow
/// happened. If self is the minimum value
#[doc = concat!("(e.g., ", stringify!($SelfT), "::MIN for values of type ", stringify!($SelfT), "),")]
#[doc = concat!("(e.g., [`", stringify!($SelfT), "::MIN`] for values of type [`", stringify!($SelfT), "`]),")]
/// then the minimum value will be returned again and true will be returned
/// for an overflow happening.
///
Expand Down Expand Up @@ -3177,7 +3177,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is zero 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 @@ -3215,7 +3215,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is zero 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 @@ -3262,7 +3262,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is zero 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 @@ -3304,7 +3304,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is zero 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 @@ -3441,8 +3441,8 @@ macro_rules! int_impl {
/// rounded down.
///
/// This method might not be optimized owing to implementation details;
/// `ilog2` can produce results more efficiently for base 2, and `ilog10`
/// can produce results more efficiently for base 10.
/// [`ilog2`][Self::ilog2] can produce results more efficiently for base 2,
/// and [`ilog10`](Self::ilog10) can produce results more efficiently for base 10.
///
/// # Panics
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1721,8 +1721,8 @@ macro_rules! uint_impl {
/// rounded down.
///
/// This method might not be optimized owing to implementation details;
/// `ilog2` can produce results more efficiently for base 2, and `ilog10`
/// can produce results more efficiently for base 10.
/// [`ilog2`](Self::ilog2) can produce results more efficiently for base 2,
/// and [`ilog10`](Self::ilog10) can produce results more efficiently for base 10.
///
/// # Panics
///
Expand Down
Loading