about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Brüschweiler <blei42@gmail.com>2013-04-28 13:31:49 +0200
committerPhilipp Brüschweiler <blei42@gmail.com>2013-04-28 13:31:49 +0200
commit8627fc972673df2dba7945cc973def0083517647 (patch)
tree2a1fd965946d7579add6a16ac601bfe61fded8b2
parent5f7947aa52f79943593c36d71868757ef351b94e (diff)
downloadrust-8627fc972673df2dba7945cc973def0083517647.tar.gz
rust-8627fc972673df2dba7945cc973def0083517647.zip
rand: Fix infinite recursion
`self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes
this same impl to be called again.
-rw-r--r--src/libcore/rand.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs
index cdf6a5bb63d..52944391851 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<R: Rng> Rng for @R {
-    fn next(&self) -> u32 { (*self).next() }
+    fn next(&self) -> u32 { (**self).next() }
 }
 
 /**