File tree Expand file tree Collapse file tree 8 files changed +17
-10
lines changed Expand file tree Collapse file tree 8 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,8 @@ jobs:
208208 features :
209209 - " "
210210 - " --features std"
211- - " --features const_evaluatable_checked "
212- - " --features std --features const_evaluatable_checked "
211+ - " --features generic_const_exprs "
212+ - " --features std --features generic_const_exprs "
213213
214214 steps :
215215 - uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ categories = ["hardware-support", "no-std"]
99license = " MIT OR Apache-2.0"
1010
1111[features ]
12- default = [" std" , " const_evaluatable_checked " ]
12+ default = [" std" , " generic_const_exprs " ]
1313std = []
14- const_evaluatable_checked = []
14+ generic_const_exprs = []
1515
1616[target .'cfg(target_arch = "wasm32")' .dev-dependencies .wasm-bindgen ]
1717version = " 0.2"
Original file line number Diff line number Diff line change 1- #![ no_std]
1+ #![ cfg_attr ( not ( feature = "std" ) , no_std) ]
22#![ allow( incomplete_features) ]
33#![ feature(
4- const_evaluatable_checked ,
4+ adt_const_params ,
55 const_fn_trait_bound,
6- const_generics,
76 platform_intrinsics,
87 repr_simd,
98 simd_ffi,
109 staged_api,
1110 stdsimd
1211) ]
12+ #![ cfg_attr( feature = "generic_const_exprs" , feature( generic_const_exprs) ) ]
1313#![ warn( missing_docs) ]
1414#![ unstable( feature = "portable_simd" , issue = "86656" ) ]
1515//! Portable SIMD module.
@@ -22,7 +22,7 @@ mod reduction;
2222mod select;
2323pub use select:: Select ;
2424
25- #[ cfg( feature = "const_evaluatable_checked " ) ]
25+ #[ cfg( feature = "generic_const_exprs " ) ]
2626mod to_bytes;
2727
2828mod comparisons;
Original file line number Diff line number Diff line change @@ -178,11 +178,13 @@ where
178178 }
179179
180180 /// Convert this mask to a bitmask, with one bit set per lane.
181+ #[ cfg( feature = "generic_const_exprs" ) ]
181182 pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
182183 self . 0 . to_bitmask ( )
183184 }
184185
185186 /// Convert a bitmask to a mask.
187+ #[ cfg( feature = "generic_const_exprs" ) ]
186188 pub fn from_bitmask ( bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
187189 Self ( mask_impl:: Mask :: from_bitmask ( bitmask) )
188190 }
Original file line number Diff line number Diff line change @@ -119,12 +119,14 @@ where
119119 Self ( core:: mem:: transmute_copy ( & mask) , PhantomData )
120120 }
121121
122+ #[ cfg( feature = "generic_const_exprs" ) ]
122123 #[ inline]
123124 pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
124125 // Safety: these are the same type and we are laundering the generic
125126 unsafe { core:: mem:: transmute_copy ( & self . 0 ) }
126127 }
127128
129+ #[ cfg( feature = "generic_const_exprs" ) ]
128130 #[ inline]
129131 pub fn from_bitmask ( bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
130132 // Safety: these are the same type and we are laundering the generic
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ where
101101 unsafe { Mask ( crate :: intrinsics:: simd_cast ( self . 0 ) ) }
102102 }
103103
104+ #[ cfg( feature = "generic_const_exprs" ) ]
104105 #[ inline]
105106 pub fn to_bitmask ( self ) -> [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] {
106107 unsafe {
@@ -127,6 +128,7 @@ where
127128 }
128129 }
129130
131+ #[ cfg( feature = "generic_const_exprs" ) ]
130132 #[ inline]
131133 pub fn from_bitmask ( mut bitmask : [ u8 ; LaneCount :: < LANES > :: BITMASK_LEN ] ) -> Self {
132134 unsafe {
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ macro_rules! test_mask_api {
6868 assert_eq!( core_simd:: Mask :: <$type, 8 >:: from_int( int) , mask) ;
6969 }
7070
71+ #[ cfg( feature = "generic_const_exprs" ) ]
7172 #[ test]
7273 fn roundtrip_bitmask_conversion( ) {
7374 let values = [
Original file line number Diff line number Diff line change 1- #![ feature( portable_simd, const_generics , const_evaluatable_checked ) ]
1+ #![ feature( portable_simd, generic_const_exprs , adt_const_params ) ]
22#![ allow( incomplete_features) ]
3- #![ cfg( feature = "const_evaluatable_checked " ) ]
3+ #![ cfg( feature = "generic_const_exprs " ) ]
44
55use core_simd:: Simd ;
66
You can’t perform that action at this time.
0 commit comments