Skip to content

Commit 2a519a4

Browse files
committed
fix use of deprecated rand API
1 parent f034a15 commit 2a519a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/miri/src/operator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
120120
let this = self.eval_context_ref();
121121
// Return one side non-deterministically.
122122
let mut rand = this.machine.rng.borrow_mut();
123-
if rand.gen() { a } else { b }
123+
if rand.random() { a } else { b }
124124
}
125125
}

0 commit comments

Comments
 (0)