From 1b487a890695e7d6dfbfe5dcd7d4fa0e8ca8003f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 27 Aug 2014 21:46:52 -0400 Subject: Implement generalized object and type parameter bounds (Fixes #16462) --- src/libcollections/priority_queue.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libcollections/priority_queue.rs') diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index 674fa129943..905078ccc3c 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -515,11 +515,18 @@ impl PriorityQueue { } } -/// `PriorityQueue` iterator. +/// Note: stage0-specific version that lacks bound on A. +#[cfg(stage0)] pub struct Items <'a, T> { iter: slice::Items<'a, T>, } +/// `PriorityQueue` iterator. +#[cfg(not(stage0))] +pub struct Items <'a, T:'a> { + iter: slice::Items<'a, T>, +} + impl<'a, T> Iterator<&'a T> for Items<'a, T> { #[inline] fn next(&mut self) -> Option<(&'a T)> { self.iter.next() } -- cgit 1.4.1-3-g733a5