about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-01 23:16:49 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-03 09:34:04 -0500
commit3fdd4b366acb23aa0fe17a844fc78cd545e56da8 (patch)
treee591b564cf346f3abaf717a5a33ae483492aae36 /src
parent41df05dd0e42b4f1c4f1b834219f3aafe02d4419 (diff)
downloadrust-3fdd4b366acb23aa0fe17a844fc78cd545e56da8.tar.gz
rust-3fdd4b366acb23aa0fe17a844fc78cd545e56da8.zip
rand: fix fallout
Diffstat (limited to 'src')
-rw-r--r--src/librand/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index e96bf80feef..0f8dbc78cde 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -25,6 +25,7 @@
 
 #![feature(macro_rules, phase, globs)]
 #![feature(unboxed_closures)]
+#![feature(associated_types)]
 #![no_std]
 #![experimental]
 
@@ -314,7 +315,9 @@ pub struct Generator<'a, T, R:'a> {
     rng: &'a mut R,
 }
 
-impl<'a, T: Rand, R: Rng> Iterator<T> for Generator<'a, T, R> {
+impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> {
+    type Item = T;
+
     fn next(&mut self) -> Option<T> {
         Some(self.rng.gen())
     }
@@ -327,7 +330,9 @@ pub struct AsciiGenerator<'a, R:'a> {
     rng: &'a mut R,
 }
 
-impl<'a, R: Rng> Iterator<char> for AsciiGenerator<'a, R> {
+impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> {
+    type Item = char;
+
     fn next(&mut self) -> Option<char> {
         static GEN_ASCII_STR_CHARSET: &'static [u8] =
             b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\