diff options
Diffstat (limited to 'src/libstd/priority_queue.rs')
| -rw-r--r-- | src/libstd/priority_queue.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index 60f25c2a270..47af3576c90 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -11,7 +11,6 @@ //! A priority queue implemented with a binary heap use core::old_iter::BaseIter; -use core::ptr::addr_of; #[abi = "rust-intrinsic"] extern "rust-intrinsic" mod rusti { @@ -151,7 +150,7 @@ pub impl <T:Ord> PriorityQueue<T> { priv fn siftup(&mut self, start: uint, mut pos: uint) { unsafe { - let new = *addr_of(&self.data[pos]); + let new = *ptr::to_unsafe_ptr(&self.data[pos]); while pos > start { let parent = (pos - 1) >> 1; @@ -171,7 +170,7 @@ pub impl <T:Ord> PriorityQueue<T> { priv fn siftdown_range(&mut self, mut pos: uint, end: uint) { unsafe { let start = pos; - let new = *addr_of(&self.data[pos]); + let new = *ptr::to_unsafe_ptr(&self.data[pos]); let mut child = 2 * pos + 1; while child < end { |
