From 8627fc972673df2dba7945cc973def0083517647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Br=C3=BCschweiler?= Date: Sun, 28 Apr 2013 13:31:49 +0200 Subject: [PATCH] rand: Fix infinite recursion `self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes this same impl to be called again. --- src/libcore/rand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs index cdf6a5bb63ded..52944391851cf 100644 --- a/src/libcore/rand.rs +++ b/src/libcore/rand.rs @@ -690,7 +690,7 @@ pub fn task_rng() -> @IsaacRng { // Allow direct chaining with `task_rng` impl Rng for @R { - fn next(&self) -> u32 { (*self).next() } + fn next(&self) -> u32 { (**self).next() } } /**