feature gate random

split-by-pattern
dignifiedquire 5 years ago
parent 5bf3d95313
commit 9c9ab90da3

@ -19,6 +19,7 @@ pub fn abort_on_panic<T>(f: impl FnOnce() -> T) -> T {
}
/// Generates a random number in `0..n`.
#[cfg(feature = "unstable")]
pub fn random(n: u32) -> u32 {
use std::cell::Cell;
use std::num::Wrapping;

Loading…
Cancel
Save