Rollup merge of #63806 - mati865:rand, r=alexcrichton
Upgrade rand to 0.7 Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
This commit is contained in:
commit
611458ba06
5 changed files with 11 additions and 10 deletions
13
Cargo.lock
13
Cargo.lock
|
@ -1139,12 +1139,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.1.8"
|
version = "0.1.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34f33de6f0ae7c9cb5e574502a562e2b512799e32abb801cd1e79ad952b62b49"
|
checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
|
"wasi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1571,9 +1572,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.61"
|
version = "0.2.62"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c665266eb592905e8503ba3403020f4b8794d26263f412ca33171600eca9a6fa"
|
checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc-std-workspace-core",
|
"rustc-std-workspace-core",
|
||||||
]
|
]
|
||||||
|
@ -3232,7 +3233,7 @@ version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"graphviz",
|
"graphviz",
|
||||||
"log",
|
"log",
|
||||||
"rand 0.6.1",
|
"rand 0.7.0",
|
||||||
"rustc",
|
"rustc",
|
||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
"rustc_fs_util",
|
"rustc_fs_util",
|
||||||
|
@ -3848,7 +3849,7 @@ dependencies = [
|
||||||
"panic_abort",
|
"panic_abort",
|
||||||
"panic_unwind",
|
"panic_unwind",
|
||||||
"profiler_builtins",
|
"profiler_builtins",
|
||||||
"rand 0.6.1",
|
"rand 0.7.0",
|
||||||
"rustc_asan",
|
"rustc_asan",
|
||||||
"rustc_lsan",
|
"rustc_lsan",
|
||||||
"rustc_msan",
|
"rustc_msan",
|
||||||
|
|
|
@ -12,7 +12,7 @@ doctest = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
graphviz = { path = "../libgraphviz" }
|
graphviz = { path = "../libgraphviz" }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
rand = "0.6"
|
rand = "0.7"
|
||||||
rustc = { path = "../librustc" }
|
rustc = { path = "../librustc" }
|
||||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||||
|
|
|
@ -38,7 +38,7 @@ features = [
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = "0.6.1"
|
rand = "0.7"
|
||||||
|
|
||||||
[target.x86_64-apple-darwin.dependencies]
|
[target.x86_64-apple-darwin.dependencies]
|
||||||
rustc_asan = { path = "../librustc_asan" }
|
rustc_asan = { path = "../librustc_asan" }
|
||||||
|
|
|
@ -2144,7 +2144,7 @@ mod tests {
|
||||||
use crate::sys_common::io::test::{TempDir, tmpdir};
|
use crate::sys_common::io::test::{TempDir, tmpdir};
|
||||||
use crate::thread;
|
use crate::thread;
|
||||||
|
|
||||||
use rand::{rngs::StdRng, FromEntropy, RngCore};
|
use rand::{rngs::StdRng, RngCore, SeedableRng};
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use crate::os::windows::fs::{symlink_dir, symlink_file};
|
use crate::os::windows::fs::{symlink_dir, symlink_file};
|
||||||
|
|
|
@ -5,7 +5,7 @@ use rand::{thread_rng, Rng};
|
||||||
use rand::distributions::Alphanumeric;
|
use rand::distributions::Alphanumeric;
|
||||||
|
|
||||||
fn make_rand_name() -> OsString {
|
fn make_rand_name() -> OsString {
|
||||||
let mut rng = thread_rng();
|
let rng = thread_rng();
|
||||||
let n = format!("TEST{}", rng.sample_iter(&Alphanumeric).take(10)
|
let n = format!("TEST{}", rng.sample_iter(&Alphanumeric).take(10)
|
||||||
.collect::<String>());
|
.collect::<String>());
|
||||||
let n = OsString::from(n);
|
let n = OsString::from(n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue