1
Fork 0

fix(core): Add #![feature(unbounded_shifts)] to doctests for unbounded_shr/unbounded_shl

This commit is contained in:
Connor Horman 2024-08-21 23:22:07 +00:00
parent 79cbb878c7
commit 9907f617ab
2 changed files with 6 additions and 2 deletions

View file

@ -1321,6 +1321,7 @@ macro_rules! int_impl {
///
/// Basic usage:
/// ```
/// #![feature(unbounded_shifts)]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(4), 0x10);")]
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
/// ```
@ -1447,10 +1448,11 @@ 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(129), 0);")]
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.unbounded_shr(129), -1);")]
/// ```
/// ```
#[unstable(feature = "unbounded_shifts", issue = "129375")]
#[rustc_allow_const_fn_unstable(unchecked_shifts)]
#[must_use = "this returns the result of the operation, \