Skip to content

Commit 8627fc9

Browse files
committed
rand: Fix infinite recursion
`self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes this same impl to be called again.
1 parent 5f7947a commit 8627fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/rand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ pub fn task_rng() -> @IsaacRng {
690690

691691
// Allow direct chaining with `task_rng`
692692
impl<R: Rng> Rng for @R {
693-
fn next(&self) -> u32 { (*self).next() }
693+
fn next(&self) -> u32 { (**self).next() }
694694
}
695695

696696
/**

0 commit comments

Comments
 (0)