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.
12
12
"""
13
13
keywords = [" random" , " rng" ]
14
14
categories = [" algorithms" , " no-std" ]
15
+ build = " build.rs"
15
16
16
17
[badges ]
17
18
travis-ci = { repository = " rust-lang-nursery/rand" }
@@ -25,7 +26,6 @@ alloc = ["rand_core/alloc"] # enables Vec and Box support (without std)
25
26
i128_support = [] # enables i128 and u128 support
26
27
simd_support = [] # enables SIMD support
27
28
serde1 = [" 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
29
29
30
30
[workspace ]
31
31
members = [" rand_core" , " rand_isaac" ]
@@ -60,5 +60,8 @@ wasm-bindgen = { version = "0.2.12", optional = true }
60
60
# deps yet, see: https://github.com/rust-lang/cargo/issues/1596
61
61
bincode = " 1.0"
62
62
63
+ [build-dependencies ]
64
+ rustc_version = " 0.2"
65
+
63
66
[package .metadata .docs .rs ]
64
67
all-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> {
276
276
}
277
277
}
278
278
279
- #[ cfg( feature = " rust_1_27" ) ]
279
+ #[ cfg( rust_1_27) ]
280
280
impl < X : SampleUniform > From < :: core:: ops:: RangeInclusive < X > > for Uniform < X > {
281
281
fn from ( r : :: core:: ops:: RangeInclusive < X > ) -> Uniform < X > {
282
282
Uniform :: new_inclusive ( r. start ( ) , r. end ( ) )
@@ -1068,7 +1068,7 @@ mod tests {
1068
1068
assert_eq ! ( r. inner. scale, 5.0 ) ;
1069
1069
}
1070
1070
1071
- #[ cfg( feature = " rust_1_27" ) ]
1071
+ #[ cfg( rust_1_27) ]
1072
1072
#[ test]
1073
1073
fn test_uniform_from_std_range_inclusive ( ) {
1074
1074
let r = Uniform :: from ( 2u32 ..=6 ) ;
You can’t perform that action at this time.
0 commit comments