Skip to content

Commit fed44d5

Browse files
committed
Update rand to 0.9.0
1 parent e08cd3c commit fed44d5

File tree

8 files changed

+124
-43
lines changed

8 files changed

+124
-43
lines changed

Cargo.lock

Lines changed: 104 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies = [
4343
"cfg-if",
4444
"once_cell",
4545
"version_check",
46-
"zerocopy",
46+
"zerocopy 0.7.35",
4747
]
4848

4949
[[package]]
@@ -1442,7 +1442,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
14421442
dependencies = [
14431443
"cfg-if",
14441444
"libc",
1445-
"wasi",
1445+
"wasi 0.11.0+wasi-snapshot-preview1",
1446+
]
1447+
1448+
[[package]]
1449+
name = "getrandom"
1450+
version = "0.3.1"
1451+
source = "registry+https://github.com/rust-lang/crates.io-index"
1452+
checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
1453+
dependencies = [
1454+
"cfg-if",
1455+
"libc",
1456+
"wasi 0.13.3+wasi-0.2.2",
1457+
"windows-targets 0.52.6",
14461458
]
14471459

14481460
[[package]]
@@ -2342,12 +2354,12 @@ dependencies = [
23422354
"chrono-tz",
23432355
"colored",
23442356
"directories",
2345-
"getrandom",
2357+
"getrandom 0.2.15",
23462358
"libc",
23472359
"libffi",
23482360
"libloading",
23492361
"measureme",
2350-
"rand",
2362+
"rand 0.8.5",
23512363
"regex",
23522364
"rustc_version",
23532365
"smallvec",
@@ -2782,7 +2794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
27822794
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
27832795
dependencies = [
27842796
"phf_shared 0.10.0",
2785-
"rand",
2797+
"rand 0.8.5",
27862798
]
27872799

27882800
[[package]]
@@ -2792,7 +2804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
27922804
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
27932805
dependencies = [
27942806
"phf_shared 0.11.3",
2795-
"rand",
2807+
"rand 0.8.5",
27962808
]
27972809

27982810
[[package]]
@@ -2860,7 +2872,7 @@ version = "0.2.20"
28602872
source = "registry+https://github.com/rust-lang/crates.io-index"
28612873
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
28622874
dependencies = [
2863-
"zerocopy",
2875+
"zerocopy 0.7.35",
28642876
]
28652877

28662878
[[package]]
@@ -2978,8 +2990,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
29782990
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
29792991
dependencies = [
29802992
"libc",
2981-
"rand_chacha",
2982-
"rand_core",
2993+
"rand_chacha 0.3.1",
2994+
"rand_core 0.6.4",
2995+
]
2996+
2997+
[[package]]
2998+
name = "rand"
2999+
version = "0.9.0"
3000+
source = "registry+https://github.com/rust-lang/crates.io-index"
3001+
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
3002+
dependencies = [
3003+
"rand_chacha 0.9.0",
3004+
"rand_core 0.9.0",
3005+
"zerocopy 0.8.14",
29833006
]
29843007

29853008
[[package]]
@@ -2989,7 +3012,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
29893012
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
29903013
dependencies = [
29913014
"ppv-lite86",
2992-
"rand_core",
3015+
"rand_core 0.6.4",
3016+
]
3017+
3018+
[[package]]
3019+
name = "rand_chacha"
3020+
version = "0.9.0"
3021+
source = "registry+https://github.com/rust-lang/crates.io-index"
3022+
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
3023+
dependencies = [
3024+
"ppv-lite86",
3025+
"rand_core 0.9.0",
29933026
]
29943027

29953028
[[package]]
@@ -2998,16 +3031,26 @@ version = "0.6.4"
29983031
source = "registry+https://github.com/rust-lang/crates.io-index"
29993032
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
30003033
dependencies = [
3001-
"getrandom",
3034+
"getrandom 0.2.15",
3035+
]
3036+
3037+
[[package]]
3038+
name = "rand_core"
3039+
version = "0.9.0"
3040+
source = "registry+https://github.com/rust-lang/crates.io-index"
3041+
checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
3042+
dependencies = [
3043+
"getrandom 0.3.1",
3044+
"zerocopy 0.8.14",
30023045
]
30033046

30043047
[[package]]
30053048
name = "rand_xoshiro"
3006-
version = "0.6.0"
3049+
version = "0.7.0"
30073050
source = "registry+https://github.com/rust-lang/crates.io-index"
3008-
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
3051+
checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41"
30093052
dependencies = [
3010-
"rand_core",
3053+
"rand_core 0.9.0",
30113054
]
30123055

30133056
[[package]]
@@ -3045,7 +3088,7 @@ version = "0.4.6"
30453088
source = "registry+https://github.com/rust-lang/crates.io-index"
30463089
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
30473090
dependencies = [
3048-
"getrandom",
3091+
"getrandom 0.2.15",
30493092
"libredox",
30503093
"thiserror 1.0.69",
30513094
]
@@ -3283,7 +3326,7 @@ name = "rustc_abi"
32833326
version = "0.0.0"
32843327
dependencies = [
32853328
"bitflags",
3286-
"rand",
3329+
"rand 0.9.0",
32873330
"rand_xoshiro",
32883331
"rustc_data_structures",
32893332
"rustc_feature",
@@ -3897,7 +3940,7 @@ dependencies = [
38973940
name = "rustc_incremental"
38983941
version = "0.0.0"
38993942
dependencies = [
3900-
"rand",
3943+
"rand 0.9.0",
39013944
"rustc_ast",
39023945
"rustc_data_structures",
39033946
"rustc_errors",
@@ -5218,7 +5261,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
52185261
dependencies = [
52195262
"cfg-if",
52205263
"fastrand",
5221-
"getrandom",
5264+
"getrandom 0.2.15",
52225265
"once_cell",
52235266
"rustix",
52245267
"windows-sys 0.59.0",
@@ -5281,8 +5324,8 @@ version = "0.1.0"
52815324
dependencies = [
52825325
"indicatif",
52835326
"num",
5284-
"rand",
5285-
"rand_chacha",
5327+
"rand 0.9.0",
5328+
"rand_chacha 0.9.0",
52865329
"rayon",
52875330
]
52885331

@@ -5602,7 +5645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
56025645
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
56035646
dependencies = [
56045647
"cfg-if",
5605-
"rand",
5648+
"rand 0.8.5",
56065649
"static_assertions",
56075650
]
56085651

@@ -5843,7 +5886,7 @@ version = "1.12.0"
58435886
source = "registry+https://github.com/rust-lang/crates.io-index"
58445887
checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4"
58455888
dependencies = [
5846-
"getrandom",
5889+
"getrandom 0.2.15",
58475890
]
58485891

58495892
[[package]]
@@ -5880,6 +5923,15 @@ version = "0.11.0+wasi-snapshot-preview1"
58805923
source = "registry+https://github.com/rust-lang/crates.io-index"
58815924
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
58825925

5926+
[[package]]
5927+
name = "wasi"
5928+
version = "0.13.3+wasi-0.2.2"
5929+
source = "registry+https://github.com/rust-lang/crates.io-index"
5930+
checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
5931+
dependencies = [
5932+
"wit-bindgen-rt",
5933+
]
5934+
58835935
[[package]]
58845936
name = "wasi-preview1-component-adapter-provider"
58855937
version = "29.0.1"
@@ -6475,6 +6527,15 @@ version = "0.1.0"
64756527
source = "registry+https://github.com/rust-lang/crates.io-index"
64766528
checksum = "3ab703352da6a72f35c39a533526393725640575bb211f61987a2748323ad956"
64776529

6530+
[[package]]
6531+
name = "wit-bindgen-rt"
6532+
version = "0.33.0"
6533+
source = "registry+https://github.com/rust-lang/crates.io-index"
6534+
checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
6535+
dependencies = [
6536+
"bitflags",
6537+
]
6538+
64786539
[[package]]
64796540
name = "wit-component"
64806541
version = "0.223.0"
@@ -6584,7 +6645,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
65846645
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
65856646
dependencies = [
65866647
"byteorder",
6587-
"zerocopy-derive",
6648+
"zerocopy-derive 0.7.35",
6649+
]
6650+
6651+
[[package]]
6652+
name = "zerocopy"
6653+
version = "0.8.14"
6654+
source = "registry+https://github.com/rust-lang/crates.io-index"
6655+
checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
6656+
dependencies = [
6657+
"zerocopy-derive 0.8.14",
65886658
]
65896659

65906660
[[package]]
@@ -6598,6 +6668,17 @@ dependencies = [
65986668
"syn 2.0.96",
65996669
]
66006670

6671+
[[package]]
6672+
name = "zerocopy-derive"
6673+
version = "0.8.14"
6674+
source = "registry+https://github.com/rust-lang/crates.io-index"
6675+
checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
6676+
dependencies = [
6677+
"proc-macro2",
6678+
"quote",
6679+
"syn 2.0.96",
6680+
]
6681+
66016682
[[package]]
66026683
name = "zerofrom"
66036684
version = "0.1.5"

compiler/rustc_abi/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
bitflags = "2.4.1"
9-
rand = { version = "0.8.4", default-features = false, optional = true }
10-
rand_xoshiro = { version = "0.6.0", optional = true }
119
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
10+
rand = { version = "0.9.0", default-features = false, optional = true }
11+
rand_xoshiro = { version = "0.7.0", optional = true }
1212
rustc_feature = { path = "../rustc_feature", optional = true }
1313
rustc_index = { path = "../rustc_index", default-features = false }
1414
rustc_macros = { path = "../rustc_macros", optional = true }

compiler/rustc_incremental/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
rand = "0.8.4"
8+
rand = "0.9.0"
99
rustc_ast = { path = "../rustc_ast" }
1010
rustc_data_structures = { path = "../rustc_data_structures" }
1111
rustc_errors = { path = "../rustc_errors" }

compiler/rustc_incremental/src/persist/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ use std::io::{self, ErrorKind};
108108
use std::path::{Path, PathBuf};
109109
use std::time::{Duration, SystemTime, UNIX_EPOCH};
110110

111-
use rand::{RngCore, thread_rng};
111+
use rand::{RngCore, rng};
112112
use rustc_data_structures::base_n::{BaseNString, CASE_INSENSITIVE, ToBaseN};
113113
use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
114114
use rustc_data_structures::svh::Svh;
@@ -444,7 +444,7 @@ fn copy_files(sess: &Session, target_dir: &Path, source_dir: &Path) -> Result<bo
444444
fn generate_session_dir_path(crate_dir: &Path) -> PathBuf {
445445
let timestamp = timestamp_to_string(SystemTime::now());
446446
debug!("generate_session_dir_path: timestamp = {}", timestamp);
447-
let random_number = thread_rng().next_u32();
447+
let random_number = rng().next_u32();
448448
debug!("generate_session_dir_path: random_number = {}", random_number);
449449

450450
// Chop the first 3 characters off the timestamp. Those 3 bytes will be zero for a while.

src/etc/test-float-parse/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ publish = false
77
[dependencies]
88
indicatif = { version = "0.17.8", default-features = false }
99
num = "0.4.3"
10-
rand = "0.8.5"
11-
rand_chacha = "0.3"
10+
rand = "0.9.0"
11+
rand_chacha = "0.9.0"
1212
rayon = "1"
1313

1414
[lib]

src/etc/test-float-parse/src/gen/fuzz.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::ops::Range;
66
use std::sync::Mutex;
77

88
use rand::Rng;
9-
use rand::distributions::{Distribution, Standard};
9+
use rand::distr::{Distribution, StandardUniform};
1010
use rand_chacha::ChaCha8Rng;
1111
use rand_chacha::rand_core::SeedableRng;
1212

@@ -47,7 +47,7 @@ impl<F: Float> Fuzz<F> {
4747

4848
impl<F: Float> Generator<F> for Fuzz<F>
4949
where
50-
Standard: Distribution<<F as Float>::Int>,
50+
StandardUniform: Distribution<<F as Float>::Int>,
5151
{
5252
const NAME: &'static str = "fuzz";
5353
const SHORT_NAME: &'static str = "fuzz";
@@ -75,13 +75,13 @@ where
7575

7676
impl<F: Float> Iterator for Fuzz<F>
7777
where
78-
Standard: Distribution<<F as Float>::Int>,
78+
StandardUniform: Distribution<<F as Float>::Int>,
7979
{
8080
type Item = <Self as Generator<F>>::WriteCtx;
8181

8282
fn next(&mut self) -> Option<Self::Item> {
8383
let _ = self.iter.next()?;
84-
let i: F::Int = self.rng.gen();
84+
let i: F::Int = self.rng.random();
8585

8686
Some(F::from_bits(i))
8787
}

0 commit comments

Comments
 (0)