about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-04-28 04:48:35 -0700
committerbors <bors@rust-lang.org>2013-04-28 04:48:35 -0700
commitcdd342bd34a7036cf1ddf3f6832c73fa018f305b (patch)
tree2a1fd965946d7579add6a16ac601bfe61fded8b2
parent5f7947aa52f79943593c36d71868757ef351b94e (diff)
parent8627fc972673df2dba7945cc973def0083517647 (diff)
downloadrust-cdd342bd34a7036cf1ddf3f6832c73fa018f305b.tar.gz
rust-cdd342bd34a7036cf1ddf3f6832c73fa018f305b.zip
auto merge of #6097 : Blei/rust/fix-rand, r=pnkfelix
`self` has type `&@Rand`, so `*self` will be of type `@Rand` which causes
this same impl to be called again.

Fixes #6061
-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() }
 }
 
 /**