Skip to content

Commit adda858

Browse files
Rollup merge of #78129 - mbartlett21:patch-1, r=kennytm
Wrapping intrinsics doc links update. The links in the wrapping intrinsics docs now refer to the `wrapping_*` functions, not the `checked_*` functions.
2 parents 01e6019 + 061cf53 commit adda858

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/core/src/intrinsics.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1660,22 +1660,22 @@ extern "rust-intrinsic" {
16601660
/// Returns (a + b) mod 2<sup>N</sup>, where N is the width of T in bits.
16611661
///
16621662
/// The stabilized versions of this intrinsic are available on the integer
1663-
/// primitives via the `checked_add` method. For example,
1664-
/// [`u32::checked_add`]
1663+
/// primitives via the `wrapping_add` method. For example,
1664+
/// [`u32::wrapping_add`]
16651665
#[rustc_const_stable(feature = "const_int_wrapping", since = "1.40.0")]
16661666
pub fn wrapping_add<T: Copy>(a: T, b: T) -> T;
16671667
/// Returns (a - b) mod 2<sup>N</sup>, where N is the width of T in bits.
16681668
///
16691669
/// The stabilized versions of this intrinsic are available on the integer
1670-
/// primitives via the `checked_sub` method. For example,
1671-
/// [`u32::checked_sub`]
1670+
/// primitives via the `wrapping_sub` method. For example,
1671+
/// [`u32::wrapping_sub`]
16721672
#[rustc_const_stable(feature = "const_int_wrapping", since = "1.40.0")]
16731673
pub fn wrapping_sub<T: Copy>(a: T, b: T) -> T;
16741674
/// Returns (a * b) mod 2<sup>N</sup>, where N is the width of T in bits.
16751675
///
16761676
/// The stabilized versions of this intrinsic are available on the integer
1677-
/// primitives via the `checked_mul` method. For example,
1678-
/// [`u32::checked_mul`]
1677+
/// primitives via the `wrapping_mul` method. For example,
1678+
/// [`u32::wrapping_mul`]
16791679
#[rustc_const_stable(feature = "const_int_wrapping", since = "1.40.0")]
16801680
pub fn wrapping_mul<T: Copy>(a: T, b: T) -> T;
16811681

0 commit comments

Comments
 (0)