mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 04:23:37 +00:00
bump rand to fix Miri failures
This commit is contained in:
parent
5170a3f45a
commit
5b78e98a37
13
Cargo.lock
13
Cargo.lock
|
@ -19,8 +19,8 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"compiler_builtins 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core 0.0.0",
|
||||
"rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_xorshift 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2343,6 +2343,14 @@ dependencies = [
|
|||
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_xorshift"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.1.0"
|
||||
|
@ -4569,6 +4577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
|
||||
"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05"
|
||||
"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3"
|
||||
"checksum rand_xorshift 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8"
|
||||
"checksum rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b0186e22767d5b9738a05eab7c6ac90b15db17e5b5f9bd87976dd7d89a10a4"
|
||||
"checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2"
|
||||
"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
|
||||
|
|
|
@ -15,8 +15,8 @@ core = { path = "../libcore" }
|
|||
compiler_builtins = { version = "0.1.10", features = ['rustc-dep-of-std'] }
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.6"
|
||||
rand_xorshift = "0.1"
|
||||
rand = "0.7"
|
||||
rand_xorshift = "0.2"
|
||||
|
||||
[[test]]
|
||||
name = "collectionstests"
|
||||
|
|
|
@ -186,12 +186,12 @@ fn gen_descending(len: usize) -> Vec<u64> {
|
|||
|
||||
fn gen_random(len: usize) -> Vec<u64> {
|
||||
let mut rng = XorShiftRng::from_seed(SEED);
|
||||
rng.sample_iter(&Standard).take(len).collect()
|
||||
(&mut rng).sample_iter(&Standard).take(len).collect()
|
||||
}
|
||||
|
||||
fn gen_random_bytes(len: usize) -> Vec<u8> {
|
||||
let mut rng = XorShiftRng::from_seed(SEED);
|
||||
rng.sample_iter(&Standard).take(len).collect()
|
||||
(&mut rng).sample_iter(&Standard).take(len).collect()
|
||||
}
|
||||
|
||||
fn gen_mostly_ascending(len: usize) -> Vec<u64> {
|
||||
|
@ -221,14 +221,14 @@ fn gen_strings(len: usize) -> Vec<String> {
|
|||
let mut v = vec![];
|
||||
for _ in 0..len {
|
||||
let n = rng.gen::<usize>() % 20 + 1;
|
||||
v.push(rng.sample_iter(&Alphanumeric).take(n).collect());
|
||||
v.push((&mut rng).sample_iter(&Alphanumeric).take(n).collect());
|
||||
}
|
||||
v
|
||||
}
|
||||
|
||||
fn gen_big_random(len: usize) -> Vec<[u64; 16]> {
|
||||
let mut rng = XorShiftRng::from_seed(SEED);
|
||||
rng.sample_iter(&Standard).map(|x| [x; 16]).take(len).collect()
|
||||
(&mut rng).sample_iter(&Standard).map(|x| [x; 16]).take(len).collect()
|
||||
}
|
||||
|
||||
macro_rules! sort {
|
||||
|
|
Loading…
Reference in a new issue