diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-03-18 23:51:19 +0000 |
|---|---|---|
| committer | Trevor Gross <t.gross35@gmail.com> | 2025-03-18 19:46:34 -0500 |
| commit | 725759602a1ca7bca8f2acf1b2cb13e7cb7fa01d (patch) | |
| tree | ec17653b121e6f48aab9296fe34f2380a3c2d91f | |
| parent | 17748827383d17e26cb222b4402976d1441378da (diff) | |
| download | rust-725759602a1ca7bca8f2acf1b2cb13e7cb7fa01d.tar.gz rust-725759602a1ca7bca8f2acf1b2cb13e7cb7fa01d.zip | |
Upgrade all dependencies to the latest
This is mostly done to get the latest version of `rand`, which includes some breaking changes.
6 files changed, 20 insertions, 25 deletions
diff --git a/library/compiler-builtins/libm/Cargo.toml b/library/compiler-builtins/libm/Cargo.toml index eb133dada16..e0aeb07d527 100644 --- a/library/compiler-builtins/libm/Cargo.toml +++ b/library/compiler-builtins/libm/Cargo.toml @@ -59,8 +59,7 @@ exclude = [ ] [dev-dependencies] -no-panic = "0.1.33" - +no-panic = "0.1.35" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = [ diff --git a/library/compiler-builtins/libm/crates/libm-macros/Cargo.toml b/library/compiler-builtins/libm/crates/libm-macros/Cargo.toml index f0de0e17689..314f4ae3783 100644 --- a/library/compiler-builtins/libm/crates/libm-macros/Cargo.toml +++ b/library/compiler-builtins/libm/crates/libm-macros/Cargo.toml @@ -9,9 +9,9 @@ proc-macro = true [dependencies] heck = "0.5.0" -proc-macro2 = "1.0.93" -quote = "1.0.38" -syn = { version = "2.0.96", features = ["full", "extra-traits", "visit-mut"] } +proc-macro2 = "1.0.94" +quote = "1.0.40" +syn = { version = "2.0.100", features = ["full", "extra-traits", "visit-mut"] } [lints.rust] # Values used during testing diff --git a/library/compiler-builtins/libm/crates/libm-test/Cargo.toml b/library/compiler-builtins/libm/crates/libm-test/Cargo.toml index dcbddb667e8..98da73ceadc 100644 --- a/library/compiler-builtins/libm/crates/libm-test/Cargo.toml +++ b/library/compiler-builtins/libm/crates/libm-test/Cargo.toml @@ -27,26 +27,22 @@ icount = ["dep:iai-callgrind"] short-benchmarks = [] [dependencies] -anyhow = "1.0.95" +anyhow = "1.0.97" # This is not directly used but is required so we can enable `gmp-mpfr-sys/force-cross`. gmp-mpfr-sys = { version = "1.6.4", optional = true, default-features = false } iai-callgrind = { version = "0.14.0", optional = true } -indicatif = { version = "0.17.9", default-features = false } +indicatif = { version = "0.17.11", default-features = false } libm = { path = "../..", features = ["unstable-public-internals"] } libm-macros = { path = "../libm-macros" } musl-math-sys = { path = "../musl-math-sys", optional = true } paste = "1.0.15" -rand = "0.8.5" -rand_chacha = "0.3.1" +rand = "0.9.0" +rand_chacha = "0.9.0" rayon = "1.10.0" rug = { version = "1.27.0", optional = true, default-features = false, features = ["float", "integer", "std"] } -[target.'cfg(target_family = "wasm")'.dependencies] -# Enable randomness on WASM -getrandom = { version = "0.2", features = ["js"] } - [build-dependencies] -rand = { version = "0.8.5", optional = true } +rand = { version = "0.9.0", optional = true } [dev-dependencies] criterion = { version = "0.5.1", default-features = false, features = ["cargo_bench_support"] } diff --git a/library/compiler-builtins/libm/crates/libm-test/src/gen/random.rs b/library/compiler-builtins/libm/crates/libm-test/src/gen/random.rs index c2cd172d1ee..e8a7ee9057e 100644 --- a/library/compiler-builtins/libm/crates/libm-test/src/gen/random.rs +++ b/library/compiler-builtins/libm/crates/libm-test/src/gen/random.rs @@ -3,7 +3,7 @@ use std::ops::RangeInclusive; use std::sync::LazyLock; use libm::support::Float; -use rand::distributions::{Alphanumeric, Standard}; +use rand::distr::{Alphanumeric, StandardUniform}; use rand::prelude::Distribution; use rand::{Rng, SeedableRng}; use rand_chacha::ChaCha8Rng; @@ -16,7 +16,7 @@ pub(crate) const SEED_ENV: &str = "LIBM_SEED"; pub static SEED: LazyLock<[u8; 32]> = LazyLock::new(|| { let s = env::var(SEED_ENV).unwrap_or_else(|_| { - let mut rng = rand::thread_rng(); + let mut rng = rand::rng(); (0..32).map(|_| rng.sample(Alphanumeric) as char).collect() }); @@ -33,19 +33,19 @@ pub trait RandomInput: Sized { /// Generate a sequence of deterministically random floats. fn random_floats<F: Float>(count: u64) -> impl Iterator<Item = F> where - Standard: Distribution<F::Int>, + StandardUniform: Distribution<F::Int>, { let mut rng = ChaCha8Rng::from_seed(*SEED); // Generate integers to get a full range of bitpatterns (including NaNs), then convert back // to the float type. - (0..count).map(move |_| F::from_bits(rng.gen::<F::Int>())) + (0..count).map(move |_| F::from_bits(rng.random::<F::Int>())) } /// Generate a sequence of deterministically random `i32`s within a specified range. fn random_ints(count: u64, range: RangeInclusive<i32>) -> impl Iterator<Item = i32> { let mut rng = ChaCha8Rng::from_seed(*SEED); - (0..count).map(move |_| rng.gen_range::<i32, _>(range.clone())) + (0..count).map(move |_| rng.random_range::<i32, _>(range.clone())) } macro_rules! impl_random_input { diff --git a/library/compiler-builtins/libm/crates/libm-test/tests/u256.rs b/library/compiler-builtins/libm/crates/libm-test/tests/u256.rs index 4174820c05b..4603534248c 100644 --- a/library/compiler-builtins/libm/crates/libm-test/tests/u256.rs +++ b/library/compiler-builtins/libm/crates/libm-test/tests/u256.rs @@ -25,8 +25,8 @@ fn hexu(v: u256) -> String { } fn random_u256(rng: &mut ChaCha8Rng) -> u256 { - let lo: u128 = rng.gen(); - let hi: u128 = rng.gen(); + let lo: u128 = rng.random(); + let hi: u128 = rng.random(); u256 { lo, hi } } @@ -121,7 +121,7 @@ fn mp_u256_shr() { for _ in 0..bigint_fuzz_iteration_count() { let x = random_u256(&mut rng); - let shift: u32 = rng.gen_range(0..255); + let shift: u32 = rng.random_range(0..255); assign_bigint(&mut bx, x); let actual = x >> shift; bx >>= shift; @@ -136,8 +136,8 @@ fn mp_u256_widen_mul() { let mut by = BigInt::new(); for _ in 0..bigint_fuzz_iteration_count() { - let x: u128 = rng.gen(); - let y: u128 = rng.gen(); + let x: u128 = rng.random(); + let y: u128 = rng.random(); bx.assign(x); by.assign(y); let actual = x.widen_mul(y); diff --git a/library/compiler-builtins/libm/crates/musl-math-sys/Cargo.toml b/library/compiler-builtins/libm/crates/musl-math-sys/Cargo.toml index cde78fd3c97..34682b74c67 100644 --- a/library/compiler-builtins/libm/crates/musl-math-sys/Cargo.toml +++ b/library/compiler-builtins/libm/crates/musl-math-sys/Cargo.toml @@ -10,4 +10,4 @@ publish = false libm = { path = "../../" } [build-dependencies] -cc = "1.2.10" +cc = "1.2.16" |
