diff --git a/README.md b/README.md index 8c6c6db..b4494f0 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The `valuable` feature enables the [`Valuable`](https://docs.rs/valuable/latest/ ### Nightly features -Activating the `nightly` feature will enable the `from_be_bytes`, `from_le_bytes`, `from_ne_bytes`, `to_be_bytes`, `to_le_bytes` and `to_ne_bytes` methods on `bnum`'s unsigned and signed integers and will make the `unchecked_...` methods `const`. This comes at the cost of only being able to compile on nightly. The nightly features that this uses are [`generic_const_exprs`](https://github.com/rust-lang/rust/issues/76560), [`const_trait_impl`](https://github.com/rust-lang/rust/issues/67792) and [`const_option_ext`](https://github.com/rust-lang/rust/issues/91930). +Activating the `nightly` feature will enable the `from_be_bytes`, `from_le_bytes`, `from_ne_bytes`, `to_be_bytes`, `to_le_bytes` and `to_ne_bytes` methods on `bnum`'s unsigned and signed integers and will make the `unchecked_...` methods `const`. This comes at the cost of only being able to compile on nightly. The nightly features that this uses are [`generic_const_exprs`](https://github.com/rust-lang/rust/issues/76560), [`const_trait_impl`](https://github.com/rust-lang/rust/issues/67792), [`effects`](https://github.com/rust-lang/rust/issues/102090) and [`const_option_ext`](https://github.com/rust-lang/rust/issues/91930). ## Testing diff --git a/src/int/ops.rs b/src/int/ops.rs index 799ff8c..7e3856a 100644 --- a/src/int/ops.rs +++ b/src/int/ops.rs @@ -200,37 +200,10 @@ macro_rules! all_shift_impls { i128 ); - #[cfg(feature = "usize_exptype")] - crate::int::ops::try_shift_impl!( - $Struct, $BUint, $BInt; - Shl, - shl, - ShlAssign, - shl_assign, - "attempt to shift left with overflow", - u32, - u64, - u128 - ); - - #[cfg(feature = "usize_exptype")] - crate::int::ops::try_shift_impl!( - $Struct, $BUint, $BInt; - Shr, - shr, - ShrAssign, - shr_assign, - "attempt to shift right with overflow", - u32, - u64, - u128 - ); - crate::int::ops::shift_impl!($Struct, Shl, shl, ShlAssign, shl_assign, u8, u16); crate::int::ops::shift_impl!($Struct, Shr, shr, ShrAssign, shr_assign, u8, u16); - #[cfg(not(feature = "usize_exptype"))] crate::int::ops::try_shift_impl!( $Struct, $BUint, $BInt; Shl, @@ -243,7 +216,6 @@ macro_rules! all_shift_impls { u128 ); - #[cfg(not(feature = "usize_exptype"))] crate::int::ops::try_shift_impl!( $Struct, $BUint, $BInt; Shr, diff --git a/src/lib.rs b/src/lib.rs index 3e48a9b..ece7ea5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,8 @@ feature( generic_const_exprs, const_trait_impl, - const_option_ext + const_option_ext, + effects, ) )] #![cfg_attr( @@ -15,7 +16,6 @@ float_minimum_maximum, wrapping_next_power_of_two, float_next_up_down, - unchecked_math, unchecked_shifts, ) )]