Skip to content

Commit cbe7338

Browse files
committed
fix(core): Add #![feature(unbounded_shifts)] to doctests for unbounded_shr/unbounded_shl
1 parent 6fd5393 commit cbe7338

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: core/src/num/int_macros.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,7 @@ macro_rules! int_impl {
13211321
///
13221322
/// Basic usage:
13231323
/// ```
1324+
/// #![feature(unbounded_shifts)]
13241325
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(4), 0x10);")]
13251326
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
13261327
/// ```
@@ -1447,10 +1448,11 @@ macro_rules! int_impl {
14471448
///
14481449
/// Basic usage:
14491450
/// ```
1451+
/// #![feature(unbounded_shifts)]
14501452
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shl(4), 0x1);")]
14511453
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
14521454
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.unbounded_shr(129), -1);")]
1453-
/// ```
1455+
/// ```
14541456
#[unstable(feature = "unbounded_shifts", issue = "129375")]
14551457
#[rustc_allow_const_fn_unstable(unchecked_shifts)]
14561458
#[must_use = "this returns the result of the operation, \

Diff for: core/src/num/uint_macros.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ macro_rules! uint_impl {
15011501
}
15021502
}
15031503

1504-
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
1504+
/// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`
15051505
///
15061506
/// If `rhs` is larger or equal to the number of bits in `self`,
15071507
/// the entire value is shifted out, and `0` is returned.
@@ -1510,6 +1510,7 @@ macro_rules! uint_impl {
15101510
///
15111511
/// Basic usage:
15121512
/// ```
1513+
/// #![feature(unbounded_shifts)]
15131514
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(4), 0x10);")]
15141515
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
15151516
/// ```
@@ -1635,6 +1636,7 @@ macro_rules! uint_impl {
16351636
///
16361637
/// Basic usage:
16371638
/// ```
1639+
/// #![feature(unbounded_shifts)]
16381640
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(4), 0x10);")]
16391641
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
16401642
/// ```

0 commit comments

Comments
 (0)