From 2a519a459cb079e7626f225a2c3755e386ee97cd Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 2 Feb 2025 16:14:32 +0100 Subject: [PATCH] fix use of deprecated rand API --- src/tools/miri/src/operator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/src/operator.rs b/src/tools/miri/src/operator.rs index a3c063d0f375..c588b6fc7f15 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 } } }