Skip to content

Commit 2665bce

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 168722 b: refs/heads/snap-stage3 c: 3fdd4b3 h: refs/heads/master v: v3
1 parent c4540af commit 2665bce

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5e21e17d9638d14af41e27e5ca9a21c8a1bc0170
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 41df05dd0e42b4f1c4f1b834219f3aafe02d4419
4+
refs/heads/snap-stage3: 3fdd4b366acb23aa0fe17a844fc78cd545e56da8
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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)