about summary refs log tree commit diff
path: root/src/libcore/iter-trait.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/iter-trait.rs')
-rw-r--r--src/libcore/iter-trait.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libcore/iter-trait.rs b/src/libcore/iter-trait.rs
index b2bb53d395f..fe42fe9e36c 100644
--- a/src/libcore/iter-trait.rs
+++ b/src/libcore/iter-trait.rs
@@ -2,17 +2,19 @@
 // workaround our lack of traits and lack of macros.  See core.{rc,rs} for
 // how this file is used.
 
+#[warn(deprecated_mode)];
+
 use cmp::{Eq, Ord};
 use inst::{IMPL_T, EACH, SIZE_HINT};
 export extensions;
 
 impl<A> IMPL_T<A>: iter::BaseIter<A> {
-    pure fn each(blk: fn(v: &A) -> bool) { EACH(self, blk) }
-    pure fn size_hint() -> Option<uint> { SIZE_HINT(self) }
+    pure fn each(blk: fn(v: &A) -> bool) { EACH(&self, blk) }
+    pure fn size_hint() -> Option<uint> { SIZE_HINT(&self) }
 }
 
 impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
-    pure fn eachi(blk: fn(uint, v: &A) -> bool) { iter::eachi(self, blk) }
+    pure fn eachi(blk: fn(uint, v: &A) -> bool) { iter::eachi(&self, blk) }
     pure fn all(blk: fn(A) -> bool) -> bool { iter::all(self, blk) }
     pure fn any(blk: fn(A) -> bool) -> bool { iter::any(self, blk) }
     pure fn foldl<B>(+b0: B, blk: fn(B, A) -> B) -> B {
@@ -24,8 +26,8 @@ impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
 }
 
 impl<A: Eq> IMPL_T<A>: iter::EqIter<A> {
-    pure fn contains(x: A) -> bool { iter::contains(self, x) }
-    pure fn count(x: A) -> uint { iter::count(self, x) }
+    pure fn contains(x: &A) -> bool { iter::contains(self, x) }
+    pure fn count(x: &A) -> uint { iter::count(self, x) }
 }
 
 impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {