fix use of deprecated rand API

This commit is contained in:
Ralf Jung 2025-02-02 16:14:32 +01:00
parent f034a15441
commit 2a519a459c

View file

@ -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 }
}
}