Skip to content

Commit 57dacfe

Browse files
committed
Like in Wrapping use shift in doctest
1 parent 6cf4dd9 commit 57dacfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/num/saturating.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ macro_rules! saturating_int_impl_signed {
625625
/// #![feature(saturating_int_impl)]
626626
/// use std::num::Saturating;
627627
///
628-
#[doc = concat!("let n = Saturating(", stringify!($t), "::MAX) / Saturating(4", stringify!($t), ");")]
628+
#[doc = concat!("let n = Saturating(", stringify!($t), "::MAX >> 2);")]
629629
///
630630
/// assert_eq!(n.leading_zeros(), 3);
631631
/// ```
@@ -740,7 +740,7 @@ macro_rules! saturating_int_impl_unsigned {
740740
/// #![feature(saturating_int_impl)]
741741
/// use std::num::Saturating;
742742
///
743-
#[doc = concat!("let n = Saturating(", stringify!($t), "::MAX) / Saturating(4", stringify!($t), ");")]
743+
#[doc = concat!("let n = Saturating(", stringify!($t), "::MAX >> 2);")]
744744
///
745745
/// assert_eq!(n.leading_zeros(), 2);
746746
/// ```

0 commit comments

Comments
 (0)