about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-02-02 16:14:32 +0100
committerRalf Jung <post@ralfj.de>2025-02-02 16:14:32 +0100
commit2a519a459cb079e7626f225a2c3755e386ee97cd (patch)
treeffbe8b28d2e8093dbe279aea665ac1794c552d95
parentf034a1544193a91fc03ced4a047fe8a3fa857b81 (diff)
downloadrust-2a519a459cb079e7626f225a2c3755e386ee97cd.tar.gz
rust-2a519a459cb079e7626f225a2c3755e386ee97cd.zip
fix use of deprecated rand API
-rw-r--r--src/tools/miri/src/operator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/miri/src/operator.rs b/src/tools/miri/src/operator.rs
index a3c063d0f37..c588b6fc7f1 100644
--- a/src/tools/miri/src/operator.rs
+++ b/src/tools/miri/src/operator.rs
@@ -120,6 +120,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
         let this = self.eval_context_ref();
         // Return one side non-deterministically.
         let mut rand = this.machine.rng.borrow_mut();
-        if rand.gen() { a } else { b }
+        if rand.random() { a } else { b }
     }
 }