Skip to content

Commit 3fdd4b3

Browse files
author
Jorge Aparicio
committed
rand: fix fallout
1 parent 41df05d commit 3fdd4b3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/librand/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#![feature(macro_rules, phase, globs)]
2727
#![feature(unboxed_closures)]
28+
#![feature(associated_types)]
2829
#![no_std]
2930
#![experimental]
3031

@@ -314,7 +315,9 @@ pub struct Generator<'a, T, R:'a> {
314315
rng: &'a mut R,
315316
}
316317

317-
impl<'a, T: Rand, R: Rng> Iterator<T> for Generator<'a, T, R> {
318+
impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> {
319+
type Item = T;
320+
318321
fn next(&mut self) -> Option<T> {
319322
Some(self.rng.gen())
320323
}
@@ -327,7 +330,9 @@ pub struct AsciiGenerator<'a, R:'a> {
327330
rng: &'a mut R,
328331
}
329332

330-
impl<'a, R: Rng> Iterator<char> for AsciiGenerator<'a, R> {
333+
impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> {
334+
type Item = char;
335+
331336
fn next(&mut self) -> Option<char> {
332337
static GEN_ASCII_STR_CHARSET: &'static [u8] =
333338
b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\

0 commit comments

Comments
 (0)