Rollup merge of #142800 - tshepang:extraneous, r=Mark-Simulacrum

integer docs: remove extraneous text

"Basic usage" implies there is an example that shows advanced usage, but these APIs are extra simple.
This commit is contained in:
Jacob Pratt 2025-06-22 08:49:05 +02:00 committed by GitHub
commit 9f99a277ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 0 additions and 455 deletions

View file

@ -29,8 +29,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN, ", stringify!($Min), ");")]
/// ```
@ -42,8 +40,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX, ", stringify!($Max), ");")]
/// ```
@ -64,8 +60,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0b100_0000", stringify!($SelfT), ";")]
///
@ -85,8 +79,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.count_zeros(), 1);")]
/// ```
@ -106,8 +98,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = -1", stringify!($SelfT), ";")]
///
@ -127,8 +117,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = -4", stringify!($SelfT), ";")]
///
@ -147,8 +135,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = -1", stringify!($SelfT), ";")]
///
@ -167,8 +153,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 3", stringify!($SelfT), ";")]
///
@ -188,8 +172,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(isolate_most_least_significant_one)]
///
@ -211,8 +193,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(isolate_most_least_significant_one)]
///
@ -236,8 +216,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = -1", stringify!($SelfT), ";")]
///
@ -259,8 +237,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $rot_op, stringify!($SelfT), ";")]
#[doc = concat!("let m = ", $rot_result, ";")]
@ -284,8 +260,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $rot_result, stringify!($SelfT), ";")]
#[doc = concat!("let m = ", $rot_op, ";")]
@ -305,8 +279,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $swap_op, stringify!($SelfT), ";")]
///
@ -328,8 +300,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $swap_op, stringify!($SelfT), ";")]
/// let m = n.reverse_bits();
@ -352,8 +322,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -384,8 +352,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -416,8 +382,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -449,8 +413,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -481,8 +443,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add(1), Some(", stringify!($SelfT), "::MAX - 1));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add(3), None);")]
@ -508,8 +468,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).strict_add(1), ", stringify!($SelfT), "::MAX - 1);")]
@ -576,8 +534,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_unsigned(2), Some(3));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add_unsigned(3), None);")]
@ -603,8 +559,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".strict_add_unsigned(2), 3);")]
@ -631,8 +585,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).checked_sub(1), Some(", stringify!($SelfT), "::MIN + 1));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).checked_sub(3), None);")]
@ -658,8 +610,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).strict_sub(1), ", stringify!($SelfT), "::MIN + 1);")]
@ -726,8 +676,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_sub_unsigned(2), Some(-1));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).checked_sub_unsigned(3), None);")]
@ -753,8 +701,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".strict_sub_unsigned(2), -1);")]
@ -781,8 +727,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_mul(1), Some(", stringify!($SelfT), "::MAX));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_mul(2), None);")]
@ -808,8 +752,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.strict_mul(1), ", stringify!($SelfT), "::MAX);")]
@ -876,8 +818,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 1).checked_div(-1), Some(", stringify!($Max), "));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_div(-1), None);")]
@ -914,8 +854,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 1).strict_div(-1), ", stringify!($Max), ");")]
@ -949,8 +887,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 1).checked_div_euclid(-1), Some(", stringify!($Max), "));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_div_euclid(-1), None);")]
@ -987,8 +923,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 1).strict_div_euclid(-1), ", stringify!($Max), ");")]
@ -1023,8 +957,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(exact_div)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 1).checked_exact_div(-1), Some(", stringify!($Max), "));")]
@ -1063,8 +995,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(exact_div)]
#[doc = concat!("assert_eq!(64", stringify!($SelfT), ".exact_div(2), 32);")]
@ -1126,8 +1056,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(2), Some(1));")]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(0), None);")]
@ -1163,8 +1091,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".strict_rem(2), 1);")]
@ -1198,8 +1124,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(2), Some(1));")]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(0), None);")]
@ -1235,8 +1159,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".strict_rem_euclid(2), 1);")]
@ -1269,8 +1191,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_neg(), Some(-5));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_neg(), None);")]
@ -1328,8 +1248,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".strict_neg(), -5);")]
@ -1356,8 +1274,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".checked_shl(4), Some(0x10));")]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".checked_shl(129), None);")]
@ -1389,8 +1305,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".strict_shl(4), 0x10);")]
@ -1453,7 +1367,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(4), 0x10);")]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
@ -1478,8 +1391,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".checked_shr(4), Some(0x1));")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".checked_shr(128), None);")]
@ -1510,8 +1421,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".strict_shr(4), 0x1);")]
@ -1575,7 +1484,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x1);")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
@ -1605,8 +1513,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((-5", stringify!($SelfT), ").checked_abs(), Some(5));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.checked_abs(), None);")]
@ -1635,8 +1541,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((-5", stringify!($SelfT), ").strict_abs(), 5);")]
@ -1666,8 +1570,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(8", stringify!($SelfT), ".checked_pow(2), Some(64));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_pow(2), None);")]
@ -1709,8 +1611,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(8", stringify!($SelfT), ".strict_pow(2), 64);")]
@ -1753,7 +1653,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_isqrt(), Some(3));")]
/// ```
@ -1801,8 +1700,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add(100), ", stringify!($SelfT), "::MAX);")]
@ -1823,8 +1720,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_unsigned(2), 3);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add_unsigned(100), ", stringify!($SelfT), "::MAX);")]
@ -1848,8 +1743,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_sub(127), -27);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_sub(100), ", stringify!($SelfT), "::MIN);")]
@ -1869,8 +1762,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_sub_unsigned(127), -27);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_sub_unsigned(100), ", stringify!($SelfT), "::MIN);")]
@ -1894,8 +1785,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_neg(), -100);")]
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").saturating_neg(), 100);")]
@ -1917,8 +1806,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_abs(), 100);")]
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").saturating_abs(), 100);")]
@ -1944,8 +1831,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".saturating_mul(12), 120);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_mul(10), ", stringify!($SelfT), "::MAX);")]
@ -1976,8 +1861,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".saturating_div(2), 2);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_div(-1), ", stringify!($SelfT), "::MIN + 1);")]
@ -2001,8 +1884,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((-4", stringify!($SelfT), ").saturating_pow(3), -64);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_pow(2), ", stringify!($SelfT), "::MAX);")]
@ -2026,8 +1907,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_add(27), 127);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.wrapping_add(2), ", stringify!($SelfT), "::MIN + 1);")]
@ -2046,8 +1925,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_add_unsigned(27), 127);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.wrapping_add_unsigned(2), ", stringify!($SelfT), "::MIN + 1);")]
@ -2066,8 +1943,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".wrapping_sub(127), -127);")]
#[doc = concat!("assert_eq!((-2", stringify!($SelfT), ").wrapping_sub(", stringify!($SelfT), "::MAX), ", stringify!($SelfT), "::MAX);")]
@ -2086,8 +1961,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".wrapping_sub_unsigned(127), -127);")]
#[doc = concat!("assert_eq!((-2", stringify!($SelfT), ").wrapping_sub_unsigned(", stringify!($UnsignedT), "::MAX), -1);")]
@ -2106,8 +1979,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".wrapping_mul(12), 120);")]
/// assert_eq!(11i8.wrapping_mul(12), -124);
@ -2134,8 +2005,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div(10), 10);")]
/// assert_eq!((-128i8).wrapping_div(-1), -128);
@ -2162,8 +2031,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div_euclid(10), 10);")]
/// assert_eq!((-128i8).wrapping_div_euclid(-1), -128);
@ -2190,8 +2057,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem(10), 0);")]
/// assert_eq!((-128i8).wrapping_rem(-1), 0);
@ -2217,8 +2082,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem_euclid(10), 0);")]
/// assert_eq!((-128i8).wrapping_rem_euclid(-1), 0);
@ -2241,8 +2104,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_neg(), -100);")]
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").wrapping_neg(), 100);")]
@ -2267,8 +2128,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((-1", stringify!($SelfT), ").wrapping_shl(7), -128);")]
#[doc = concat!("assert_eq!((-1", stringify!($SelfT), ").wrapping_shl(128), -1);")]
@ -2296,8 +2155,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!((-128", stringify!($SelfT), ").wrapping_shr(7), -1);")]
/// assert_eq!((-128i16).wrapping_shr(64), -128);
@ -2324,8 +2181,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_abs(), 100);")]
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").wrapping_abs(), 100);")]
@ -2352,8 +2207,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".unsigned_abs(), 100", stringify!($UnsignedT), ");")]
#[doc = concat!("assert_eq!((-100", stringify!($SelfT), ").unsigned_abs(), 100", stringify!($UnsignedT), ");")]
@ -2373,8 +2226,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".wrapping_pow(4), 81);")]
/// assert_eq!(3i8.wrapping_pow(5), -13);
@ -2432,8 +2283,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($SelfT), "::MIN, true));")]
@ -2513,8 +2362,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_unsigned(2), (3, false));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN).overflowing_add_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MAX, false));")]
@ -2538,8 +2385,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_sub(2), (3, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($SelfT), "::MAX, true));")]
@ -2620,8 +2465,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_sub_unsigned(2), (-1, false));")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX).overflowing_sub_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MIN, false));")]
@ -2645,8 +2488,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_mul(2), (10, false));")]
/// assert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));
@ -2671,8 +2512,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `i32` is used here.
///
@ -2704,8 +2543,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `i32` is used here.
///
@ -2744,8 +2581,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `i32` is used here.
///
@ -2780,8 +2615,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div(2), (2, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_div(-1), (", stringify!($SelfT), "::MIN, true));")]
@ -2811,8 +2644,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div_euclid(2), (2, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_div_euclid(-1), (", stringify!($SelfT), "::MIN, true));")]
@ -2842,8 +2673,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem(2), (1, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem(-1), (0, true));")]
@ -2873,8 +2702,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_rem_euclid(-1), (0, true));")]
@ -2902,8 +2729,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".overflowing_neg(), (-2, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($SelfT), "::MIN, true));")]
@ -2930,8 +2755,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT),".overflowing_shl(4), (0x10, false));")]
/// assert_eq!(0x1i32.overflowing_shl(36), (0x10, true));
@ -2954,8 +2777,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(4), (0x1, false));")]
/// assert_eq!(0x10i32.overflowing_shr(36), (0x1, true));
@ -2979,8 +2800,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".overflowing_abs(), (10, false));")]
#[doc = concat!("assert_eq!((-10", stringify!($SelfT), ").overflowing_abs(), (10, false));")]
@ -3002,8 +2821,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".overflowing_pow(4), (81, false));")]
/// assert_eq!(3i8.overflowing_pow(5), (-13, true));
@ -3045,8 +2862,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let x: ", stringify!($SelfT), " = 2; // or any other integer type")]
///
@ -3106,7 +2921,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
/// ```
@ -3142,8 +2956,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let a: ", stringify!($SelfT), " = 7; // or any other integer type")]
/// let b = 4;
@ -3181,8 +2993,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let a: ", stringify!($SelfT), " = 7; // or any other integer type")]
/// let b = 4;
@ -3230,8 +3040,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(int_roundings)]
#[doc = concat!("let a: ", stringify!($SelfT)," = 8;")]
@ -3274,8 +3082,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(int_roundings)]
#[doc = concat!("let a: ", stringify!($SelfT)," = 8;")]
@ -3321,8 +3127,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
@ -3367,8 +3171,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
@ -3582,8 +3384,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".abs(), 10);")]
#[doc = concat!("assert_eq!((-10", stringify!($SelfT), ").abs(), 10);")]
@ -3613,8 +3413,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(80), 20", stringify!($UnsignedT), ");")]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(110), 10", stringify!($UnsignedT), ");")]
@ -3656,8 +3454,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".signum(), 1);")]
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".signum(), 0);")]
@ -3682,8 +3478,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert!(10", stringify!($SelfT), ".is_positive());")]
#[doc = concat!("assert!(!(-10", stringify!($SelfT), ").is_positive());")]
@ -3699,8 +3493,6 @@ macro_rules! int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert!((-10", stringify!($SelfT), ").is_negative());")]
#[doc = concat!("assert!(!10", stringify!($SelfT), ".is_negative());")]

View file

@ -1399,7 +1399,6 @@ macro_rules! from_str_int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
/// use std::str::FromStr;
///
@ -1445,7 +1444,6 @@ macro_rules! from_str_int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(", stringify!($int_ty), "::from_str_radix(\"A\", 16), Ok(10));")]
/// ```
@ -1478,7 +1476,6 @@ macro_rules! from_str_int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
/// #![feature(int_from_ascii)]
///
@ -1523,7 +1520,6 @@ macro_rules! from_str_int_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
/// #![feature(int_from_ascii)]
///

View file

@ -300,8 +300,6 @@ macro_rules! saturating_impl {
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -490,8 +488,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -504,8 +500,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -518,8 +512,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -532,8 +524,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -556,8 +546,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -576,8 +564,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -603,8 +589,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -631,8 +615,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -654,8 +636,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -683,8 +663,6 @@ macro_rules! saturating_int_impl {
/// Please note that this example is shared between integer types.
/// Which explains why `i16` is used here.
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -712,8 +690,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -740,8 +716,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -768,8 +742,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -797,8 +769,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -823,8 +793,6 @@ macro_rules! saturating_int_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -860,8 +828,6 @@ macro_rules! saturating_int_impl_signed {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -883,8 +849,6 @@ macro_rules! saturating_int_impl_signed {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -911,8 +875,6 @@ macro_rules! saturating_int_impl_signed {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -934,8 +896,6 @@ macro_rules! saturating_int_impl_signed {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -955,8 +915,6 @@ macro_rules! saturating_int_impl_signed {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -994,8 +952,6 @@ macro_rules! saturating_int_impl_unsigned {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///
@ -1016,8 +972,6 @@ macro_rules! saturating_int_impl_unsigned {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::num::Saturating;
///

View file

@ -27,8 +27,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN, 0);")]
/// ```
@ -40,8 +38,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX, ", stringify!($MaxV), ");")]
/// ```
@ -62,8 +58,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0b01001100", stringify!($SelfT), ";")]
/// assert_eq!(n.count_ones(), 3);
@ -89,8 +83,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let zero = 0", stringify!($SelfT), ";")]
#[doc = concat!("assert_eq!(zero.count_zeros(), ", stringify!($BITS), ");")]
@ -114,8 +106,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", stringify!($SelfT), "::MAX >> 2;")]
/// assert_eq!(n.leading_zeros(), 2);
@ -141,8 +131,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0b0101000", stringify!($SelfT), ";")]
/// assert_eq!(n.trailing_zeros(), 3);
@ -166,8 +154,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = !(", stringify!($SelfT), "::MAX >> 2);")]
/// assert_eq!(n.leading_ones(), 2);
@ -192,8 +178,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0b1010111", stringify!($SelfT), ";")]
/// assert_eq!(n.trailing_ones(), 3);
@ -219,8 +203,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(uint_bit_width)]
///
@ -242,8 +224,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(isolate_most_least_significant_one)]
///
@ -265,8 +245,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(isolate_most_least_significant_one)]
///
@ -290,8 +268,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", stringify!($SelfT), "::MAX;")]
///
@ -313,8 +289,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $rot_op, stringify!($SelfT), ";")]
#[doc = concat!("let m = ", $rot_result, ";")]
@ -338,8 +312,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $rot_result, stringify!($SelfT), ";")]
#[doc = concat!("let m = ", $rot_op, ";")]
@ -359,8 +331,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $swap_op, stringify!($SelfT), ";")]
/// let m = n.swap_bytes();
@ -381,8 +351,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = ", $swap_op, stringify!($SelfT), ";")]
/// let m = n.reverse_bits();
@ -406,8 +374,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -439,8 +405,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -472,8 +436,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -506,8 +468,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("let n = 0x1A", stringify!($SelfT), ";")]
///
@ -538,8 +498,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!(
"assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add(1), ",
@ -579,8 +537,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).strict_add(1), ", stringify!($SelfT), "::MAX - 1);")]
@ -647,8 +603,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_signed(2), Some(3));")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_signed(-2), None);")]
@ -675,8 +629,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".strict_add_signed(2), 3);")]
@ -708,8 +660,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_sub(1), Some(0));")]
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".checked_sub(1), None);")]
@ -744,8 +694,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".strict_sub(1), 0);")]
@ -837,8 +785,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(mixed_integer_ops_unsigned_sub)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_sub_signed(2), None);")]
@ -866,8 +812,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(unsigned_signed_diff)]
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".checked_signed_diff(2), Some(8));")]
@ -925,8 +869,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_mul(1), Some(5));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_mul(2), None);")]
@ -952,8 +894,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".strict_mul(1), 5);")]
@ -1020,8 +960,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(128", stringify!($SelfT), ".checked_div(2), Some(64));")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_div(0), None);")]
@ -1053,8 +991,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".strict_div(10), 10);")]
@ -1080,8 +1016,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(128", stringify!($SelfT), ".checked_div_euclid(2), Some(64));")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_div_euclid(0), None);")]
@ -1113,8 +1047,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".strict_div_euclid(10), 10);")]
@ -1142,8 +1074,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(exact_div)]
#[doc = concat!("assert_eq!(64", stringify!($SelfT), ".exact_div(2), 32);")]
@ -1184,8 +1114,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(exact_div)]
#[doc = concat!("assert_eq!(64", stringify!($SelfT), ".exact_div(2), 32);")]
@ -1241,8 +1169,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(2), Some(1));")]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem(0), None);")]
@ -1275,8 +1201,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".strict_rem(10), 0);")]
@ -1302,8 +1226,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(2), Some(1));")]
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".checked_rem_euclid(0), None);")]
@ -1336,8 +1258,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".strict_rem_euclid(10), 0);")]
@ -1583,8 +1503,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".checked_neg(), Some(0));")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_neg(), None);")]
@ -1612,8 +1530,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".strict_neg(), 0);")]
@ -1640,8 +1556,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".checked_shl(4), Some(0x10));")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".checked_shl(129), None);")]
@ -1673,8 +1587,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".strict_shl(4), 0x10);")]
@ -1737,7 +1649,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(4), 0x10);")]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
@ -1762,8 +1673,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".checked_shr(4), Some(0x1));")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".checked_shr(129), None);")]
@ -1794,8 +1703,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".strict_shr(4), 0x1);")]
@ -1858,7 +1765,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x1);")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
@ -1883,8 +1789,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".checked_pow(5), Some(32));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.checked_pow(2), None);")]
@ -1925,8 +1829,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(strict_overflow_ops)]
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".strict_pow(5), 32);")]
@ -1968,8 +1870,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_add(1), 101);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add(127), ", stringify!($SelfT), "::MAX);")]
@ -1988,8 +1888,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_signed(2), 3);")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_signed(-2), 0);")]
@ -2016,8 +1914,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_sub(27), 73);")]
#[doc = concat!("assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);")]
@ -2036,8 +1932,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(mixed_integer_ops_unsigned_sub)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_sub_signed(2), 0);")]
@ -2065,8 +1959,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".saturating_mul(10), 20);")]
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX).saturating_mul(10), ", stringify!($SelfT),"::MAX);")]
@ -2092,8 +1984,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".saturating_div(2), 2);")]
///
@ -2114,8 +2004,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(4", stringify!($SelfT), ".saturating_pow(3), 64);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_pow(2), ", stringify!($SelfT), "::MAX);")]
@ -2137,8 +2025,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(200", stringify!($SelfT), ".wrapping_add(55), 255);")]
#[doc = concat!("assert_eq!(200", stringify!($SelfT), ".wrapping_add(", stringify!($SelfT), "::MAX), 199);")]
@ -2157,8 +2043,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_add_signed(2), 3);")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_add_signed(-2), ", stringify!($SelfT), "::MAX);")]
@ -2178,8 +2062,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_sub(100), 0);")]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_sub(", stringify!($SelfT), "::MAX), 101);")]
@ -2198,8 +2080,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(mixed_integer_ops_unsigned_sub)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_sub_signed(2), ", stringify!($SelfT), "::MAX);")]
@ -2219,8 +2099,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `u8` is used here.
///
@ -2249,8 +2127,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div(10), 10);")]
/// ```
@ -2278,8 +2154,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_div_euclid(10), 10);")]
/// ```
@ -2306,8 +2180,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem(10), 0);")]
/// ```
@ -2336,8 +2208,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_rem_euclid(10), 0);")]
/// ```
@ -2363,8 +2233,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0_", stringify!($SelfT), ".wrapping_neg(), 0);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.wrapping_neg(), 1);")]
@ -2393,8 +2261,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_shl(7), 128);")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);")]
@ -2425,8 +2291,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(128", stringify!($SelfT), ".wrapping_shr(7), 1);")]
#[doc = concat!("assert_eq!(128", stringify!($SelfT), ".wrapping_shr(128), 128);")]
@ -2449,8 +2313,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".wrapping_pow(5), 243);")]
/// assert_eq!(3u8.wrapping_pow(6), 217);
@ -2507,8 +2369,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));")]
@ -2587,8 +2447,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_signed(2), (3, false));")]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_signed(-2), (", stringify!($SelfT), "::MAX, true));")]
@ -2612,8 +2470,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_sub(2), (3, false));")]
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".overflowing_sub(1), (", stringify!($SelfT), "::MAX, true));")]
@ -2683,8 +2539,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(mixed_integer_ops_unsigned_sub)]
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_sub_signed(2), (", stringify!($SelfT), "::MAX, true));")]
@ -2705,8 +2559,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(80), 20", stringify!($SelfT), ");")]
#[doc = concat!("assert_eq!(100", stringify!($SelfT), ".abs_diff(110), 10", stringify!($SelfT), ");")]
@ -2738,8 +2590,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `u32` is used here.
///
@ -2767,8 +2617,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `u32` is used here.
///
@ -2800,8 +2648,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types.
/// Which explains why `u32` is used here.
///
@ -2888,8 +2734,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// Please note that this example is shared between integer types,
/// which explains why `u32` is used here.
///
@ -2955,8 +2799,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div(2), (2, false));")]
/// ```
@ -2986,8 +2828,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_div_euclid(2), (2, false));")]
/// ```
@ -3014,8 +2854,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem(2), (1, false));")]
/// ```
@ -3045,8 +2883,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(5", stringify!($SelfT), ".overflowing_rem_euclid(2), (1, false));")]
/// ```
@ -3069,8 +2905,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".overflowing_neg(), (0, false));")]
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".overflowing_neg(), (-2i32 as ", stringify!($SelfT), ", true));")]
@ -3094,8 +2928,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(4), (0x10, false));")]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(132), (0x10, true));")]
@ -3120,8 +2952,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(4), (0x1, false));")]
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));")]
@ -3142,8 +2972,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".overflowing_pow(5), (243, false));")]
/// assert_eq!(3u8.overflowing_pow(6), (217, true));
@ -3185,8 +3013,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".pow(5), 32);")]
/// ```
@ -3240,7 +3066,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
/// ```
#[doc = concat!("assert_eq!(10", stringify!($SelfT), ".isqrt(), 3);")]
/// ```
@ -3282,8 +3107,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(7", stringify!($SelfT), ".div_euclid(4), 1); // or any other integer type")]
/// ```
@ -3310,8 +3133,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(7", stringify!($SelfT), ".rem_euclid(4), 3); // or any other integer type")]
/// ```
@ -3336,8 +3157,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(int_roundings)]
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_floor(4), 1);")]
@ -3359,8 +3178,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(7_", stringify!($SelfT), ".div_ceil(4), 2);")]
/// ```
@ -3394,8 +3211,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".next_multiple_of(8), 16);")]
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".next_multiple_of(8), 24);")]
@ -3419,8 +3234,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(16_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(16));")]
#[doc = concat!("assert_eq!(23_", stringify!($SelfT), ".checked_next_multiple_of(8), Some(24));")]
@ -3448,8 +3261,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert!(6_", stringify!($SelfT), ".is_multiple_of(2));")]
#[doc = concat!("assert!(!5_", stringify!($SelfT), ".is_multiple_of(2));")]
@ -3473,8 +3284,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert!(16", stringify!($SelfT), ".is_power_of_two());")]
#[doc = concat!("assert!(!10", stringify!($SelfT), ".is_power_of_two());")]
@ -3517,8 +3326,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".next_power_of_two(), 2);")]
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".next_power_of_two(), 4);")]
@ -3540,8 +3347,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".checked_next_power_of_two(), Some(2));")]
#[doc = concat!("assert_eq!(3", stringify!($SelfT), ".checked_next_power_of_two(), Some(4));")]
@ -3562,8 +3367,6 @@ macro_rules! uint_impl {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(wrapping_next_power_of_two)]
///