about summary refs log tree commit diff
diff options
context:
space:
mode:
authorConnor Horman <chorman64@gmail.com>2024-08-22 00:08:03 +0000
committerConnor Horman <chorman64@gmail.com>2024-08-22 00:08:03 +0000
commit2cf48eaebc9aa696aa7e7170e8d340123daddaa4 (patch)
treec3173ec2f31aea0d27d6c2f510ee73bd188c0df8
parent27b63b85ec7f8a767b91dd75bad7ca18399901a6 (diff)
downloadrust-2cf48eaebc9aa696aa7e7170e8d340123daddaa4.tar.gz
rust-2cf48eaebc9aa696aa7e7170e8d340123daddaa4.zip
fix(core): Use correct operations/values in `unbounded_shr` doctests
-rw-r--r--library/core/src/num/int_macros.rs2
-rw-r--r--library/core/src/num/uint_macros.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs
index c11cae1666f..d3dd68a9d61 100644
--- a/library/core/src/num/int_macros.rs
+++ b/library/core/src/num/int_macros.rs
@@ -1449,7 +1449,7 @@ macro_rules! int_impl {
         /// Basic usage:
         /// ```
         /// #![feature(unbounded_shifts)]
-        #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shl(4), 0x1);")]
+        #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x1);")]
         #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
         #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.unbounded_shr(129), -1);")]
         /// ```
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index 161ee649c84..2e4e367af9b 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -1637,7 +1637,7 @@ macro_rules! uint_impl {
         /// Basic usage:
         /// ```
         /// #![feature(unbounded_shifts)]
-        #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x10);")]
+        #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x1);")]
         #[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
         /// ```
         #[unstable(feature = "unbounded_shifts", issue = "129375")]