@@ -1548,7 +1548,7 @@ impl<T> OwnedVector<T> for ~[T] {
1548
1548
let p = self . as_mut_ptr ( ) . offset ( i as int ) ;
1549
1549
// Shift everything over to make space. (Duplicating the
1550
1550
// `i`th element into two consecutive places.)
1551
- ptr:: copy_memory ( p. offset ( 1 ) , p, len - i) ;
1551
+ ptr:: copy_memory ( p. offset ( 1 ) , & * p, len - i) ;
1552
1552
// Write it in, overwriting the first copy of the `i`th
1553
1553
// element.
1554
1554
mem:: move_val_init ( & mut * p, x) ;
@@ -1567,7 +1567,7 @@ impl<T> OwnedVector<T> for ~[T] {
1567
1567
let ret = Some ( ptr:: read_ptr ( ptr as * T ) ) ;
1568
1568
1569
1569
// Shift everything down to fill in that spot.
1570
- ptr:: copy_memory ( ptr, ptr. offset ( 1 ) , len - i - 1 ) ;
1570
+ ptr:: copy_memory ( ptr, & * ptr. offset ( 1 ) , len - i - 1 ) ;
1571
1571
self . set_len ( len - 1 ) ;
1572
1572
1573
1573
ret
@@ -1842,7 +1842,7 @@ fn insertion_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
1842
1842
if i != j {
1843
1843
let tmp = ptr:: read_ptr ( read_ptr) ;
1844
1844
ptr:: copy_memory ( buf_v. offset ( j + 1 ) ,
1845
- buf_v. offset ( j) ,
1845
+ & * buf_v. offset ( j) ,
1846
1846
( i - j) as uint ) ;
1847
1847
ptr:: copy_nonoverlapping_memory ( buf_v. offset ( j) ,
1848
1848
& tmp as * T ,
@@ -1920,7 +1920,7 @@ fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
1920
1920
// that case, `i == j` so we don't copy. The
1921
1921
// `.offset(j)` is always in bounds.
1922
1922
ptr:: copy_memory ( buf_dat. offset ( j + 1 ) ,
1923
- buf_dat. offset ( j) ,
1923
+ & * buf_dat. offset ( j) ,
1924
1924
i - j as uint ) ;
1925
1925
ptr:: copy_nonoverlapping_memory ( buf_dat. offset ( j) , read_ptr, 1 ) ;
1926
1926
}
@@ -1970,11 +1970,11 @@ fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
1970
1970
if left == right_start {
1971
1971
// the number remaining in this run.
1972
1972
let elems = ( right_end as uint - right as uint ) / mem:: size_of :: < T > ( ) ;
1973
- ptr:: copy_nonoverlapping_memory ( out, right, elems) ;
1973
+ ptr:: copy_nonoverlapping_memory ( out, & * right, elems) ;
1974
1974
break ;
1975
1975
} else if right == right_end {
1976
1976
let elems = ( right_start as uint - left as uint ) / mem:: size_of :: < T > ( ) ;
1977
- ptr:: copy_nonoverlapping_memory ( out, left, elems) ;
1977
+ ptr:: copy_nonoverlapping_memory ( out, & * left, elems) ;
1978
1978
break ;
1979
1979
}
1980
1980
@@ -1988,7 +1988,7 @@ fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
1988
1988
} else {
1989
1989
step ( & mut left)
1990
1990
} ;
1991
- ptr:: copy_nonoverlapping_memory ( out, to_copy, 1 ) ;
1991
+ ptr:: copy_nonoverlapping_memory ( out, & * to_copy, 1 ) ;
1992
1992
step ( & mut out) ;
1993
1993
}
1994
1994
}
@@ -2002,7 +2002,7 @@ fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
2002
2002
// write the result to `v` in one go, so that there are never two copies
2003
2003
// of the same object in `v`.
2004
2004
unsafe {
2005
- ptr:: copy_nonoverlapping_memory ( v. as_mut_ptr ( ) , buf_dat, len) ;
2005
+ ptr:: copy_nonoverlapping_memory ( v. as_mut_ptr ( ) , & * buf_dat, len) ;
2006
2006
}
2007
2007
2008
2008
// increment the pointer, returning the old pointer.
0 commit comments