diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-12-16 19:41:07 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-12-16 19:41:07 -0800 |
| commit | 90bebe35224c6dc0238e3a35726bcd5fb0088337 (patch) | |
| tree | 47904adcc3deb9f6e01528518107edeec7583a4d /src/libstd/priority_queue.rs | |
| parent | ac695aa21a93dc7b82d817a69c8c1918bb4d9b31 (diff) | |
| download | rust-90bebe35224c6dc0238e3a35726bcd5fb0088337.tar.gz rust-90bebe35224c6dc0238e3a35726bcd5fb0088337.zip | |
Add various workaround attributes to priority_queue
Diffstat (limited to 'src/libstd/priority_queue.rs')
| -rw-r--r-- | src/libstd/priority_queue.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index bb9d5f5261f..605dd81eba6 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -79,9 +79,19 @@ impl <T: Ord> PriorityQueue<T> { } /// Consume the PriorityQueue and return the underlying vector + #[cfg(stage0)] + pure fn to_vec(self) -> ~[T] { fail } + #[cfg(stage1)] + #[cfg(stage2)] + #[cfg(stage3)] pure fn to_vec(self) -> ~[T] { let PriorityQueue{data: v} = self; v } /// Consume the PriorityQueue and return a vector in sorted (ascending) order + #[cfg(stage0)] + pure fn to_sorted_vec(self) -> ~[T] { fail } + #[cfg(stage1)] + #[cfg(stage2)] + #[cfg(stage3)] pure fn to_sorted_vec(self) -> ~[T] { let mut q = self; let mut end = q.len(); @@ -244,6 +254,7 @@ mod tests { #[test] #[should_fail] + #[ignore(cfg(windows))] fn test_empty_pop() { let mut heap = from_vec::<int>(~[]); heap.pop(); } #[test] @@ -254,6 +265,7 @@ mod tests { #[test] #[should_fail] + #[ignore(cfg(windows))] fn test_empty_top() { let empty = from_vec::<int>(~[]); empty.top(); } #[test] @@ -264,6 +276,7 @@ mod tests { #[test] #[should_fail] + #[ignore(cfg(windows))] fn test_empty_replace() { let mut heap = from_vec::<int>(~[]); heap.replace(5); |
