From 5299ef149b1d48af1d11491bf4e0af8733949154 Mon Sep 17 00:00:00 2001 From: Connor Horman Date: Thu, 22 Aug 2024 00:08:03 +0000 Subject: [PATCH] fix(core): Use correct operations/values in `unbounded_shr` doctests --- core/src/num/int_macros.rs | 2 +- core/src/num/uint_macros.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/num/int_macros.rs b/core/src/num/int_macros.rs index c11cae1666f20..d3dd68a9d610c 100644 --- a/core/src/num/int_macros.rs +++ b/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/core/src/num/uint_macros.rs b/core/src/num/uint_macros.rs index 161ee649c841b..2e4e367af9b90 100644 --- a/core/src/num/uint_macros.rs +++ b/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")]