1
Fork 0

librustc: Remove ptr::addr_of.

This commit is contained in:
Patrick Walton 2013-04-22 14:27:30 -07:00
parent 58791c2fd8
commit b0522a497c
61 changed files with 276 additions and 300 deletions

View file

@ -151,7 +151,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 +171,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 {