about summary refs log tree commit diff
path: root/src/libstd/priority_queue.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-05-02 18:33:27 -0400
committerAlex Crichton <alex@alexcrichton.com>2013-05-10 02:46:18 -0400
commit3ce9dba6775c7e1dbfb510626c073a8f926b6880 (patch)
treeb4c89fe29979a959c75f783ebe766d0cd6734254 /src/libstd/priority_queue.rs
parent28256052a4b141350dc0fe4e2e5357137bb49706 (diff)
downloadrust-3ce9dba6775c7e1dbfb510626c073a8f926b6880.tar.gz
rust-3ce9dba6775c7e1dbfb510626c073a8f926b6880.zip
std: Use the new `for` protocol
Diffstat (limited to 'src/libstd/priority_queue.rs')
-rw-r--r--src/libstd/priority_queue.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs
index b2f8c9c3c4e..bdb93142472 100644
--- a/src/libstd/priority_queue.rs
+++ b/src/libstd/priority_queue.rs
@@ -28,7 +28,14 @@ impl<T:Ord> BaseIter<T> for PriorityQueue<T> {
     /// Visit all values in the underlying vector.
     ///
     /// The values are **not** visited in order.
+    #[cfg(stage0)]
     fn each(&self, f: &fn(&T) -> bool) { self.data.each(f) }
+    /// Visit all values in the underlying vector.
+    ///
+    /// The values are **not** visited in order.
+    #[cfg(not(stage0))]
+    fn each(&self, f: &fn(&T) -> bool) -> bool { self.data.each(f) }
+
     fn size_hint(&self) -> Option<uint> { self.data.size_hint() }
 }