File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Random number generators and other randomness functionality.
1212"""
1313keywords = [" random" , " rng" ]
1414categories = [" algorithms" , " no-std" ]
15+ build = " build.rs"
1516
1617[badges ]
1718travis-ci = { repository = " rust-lang-nursery/rand" }
@@ -25,7 +26,6 @@ alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
2526i128_support = [] # enables i128 and u128 support
2627simd_support = [] # enables SIMD support
2728serde1 = [" serde" , " serde_derive" , " rand_core/serde1" ] # enables serialization for PRNGs
28- rust_1_27 = [" i128_support" ] # enables RangeInclusive, i128 and u128 support for Rust >= 1.27
2929
3030[workspace ]
3131members = [" rand_core" , " rand_isaac" ]
@@ -60,5 +60,8 @@ wasm-bindgen = { version = "0.2.12", optional = true }
6060# deps yet, see: https://github.com/rust-lang/cargo/issues/1596
6161bincode = " 1.0"
6262
63+ [build-dependencies ]
64+ rustc_version = " 0.2"
65+
6366[package .metadata .docs .rs ]
6467all-features = true
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ impl<X: SampleUniform> From<::core::ops::Range<X>> for Uniform<X> {
276276 }
277277}
278278
279- #[ cfg( feature = " rust_1_27" ) ]
279+ #[ cfg( rust_1_27) ]
280280impl < X : SampleUniform > From < :: core:: ops:: RangeInclusive < X > > for Uniform < X > {
281281 fn from ( r : :: core:: ops:: RangeInclusive < X > ) -> Uniform < X > {
282282 Uniform :: new_inclusive ( r. start ( ) , r. end ( ) )
@@ -1068,7 +1068,7 @@ mod tests {
10681068 assert_eq ! ( r. inner. scale, 5.0 ) ;
10691069 }
10701070
1071- #[ cfg( feature = " rust_1_27" ) ]
1071+ #[ cfg( rust_1_27) ]
10721072 #[ test]
10731073 fn test_uniform_from_std_range_inclusive ( ) {
10741074 let r = Uniform :: from ( 2u32 ..=6 ) ;
You can’t perform that action at this time.
0 commit comments