diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-10-09 09:56:57 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-10-09 22:22:44 +1100 |
| commit | 62fededd8e9cfd85197f224123a057df43a6feab (patch) | |
| tree | 666d94d5f238e7f17b321dbf4749745d92243fee /src/libstd/rand/mod.rs | |
| parent | 618c6afe3232d0cc3750178d4f301352684ddde6 (diff) | |
| download | rust-62fededd8e9cfd85197f224123a057df43a6feab.tar.gz rust-62fededd8e9cfd85197f224123a057df43a6feab.zip | |
std::rand: Make Rng.next_u32 non-default, waiting for #7771.
Diffstat (limited to 'src/libstd/rand/mod.rs')
| -rw-r--r-- | src/libstd/rand/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index f68bf71ba7f..a6ffbdd7b17 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -99,12 +99,8 @@ pub trait Rng { /// Return the next random u32. This rarely needs to be called /// directly, prefer `r.gen()` to `r.next_u32()`. /// - /// By default this is implemented in terms of `next_u64`. An - /// implementation of this trait must provide at least one of - /// these two methods. - fn next_u32(&mut self) -> u32 { - self.next_u64() as u32 - } + // FIXME #7771: Should be implemented in terms of next_u64 + fn next_u32(&mut self) -> u32; /// Return the next random u64. This rarely needs to be called /// directly, prefer `r.gen()` to `r.next_u64()`. |
