diff options
| author | Christopher Durham <cad97@cad97.com> | 2017-12-23 03:47:13 -0500 |
|---|---|---|
| committer | Christopher Durham <cad97@cad97.com> | 2017-12-23 03:47:13 -0500 |
| commit | 056370167a832165fba16b6350b3ffac686d23bc (patch) | |
| tree | 45acd4ea79bf85c9bbdba7a03ddd098c12dac030 | |
| parent | 1e2bd7021acc7d2243a164d75ac8d2fc05ed4513 (diff) | |
| download | rust-056370167a832165fba16b6350b3ffac686d23bc.tar.gz rust-056370167a832165fba16b6350b3ffac686d23bc.zip | |
Annotate raw pointer target types
cc https://github.com/rust-lang/rust/issues/46906 cc https://github.com/rust-lang/rust/pull/46914
| -rw-r--r-- | src/librustc_data_structures/array_vec.rs | 5 | ||||
| -rw-r--r-- | src/libstd/sys/windows/fs.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_data_structures/array_vec.rs b/src/librustc_data_structures/array_vec.rs index c107b4a539a..57fc78ef531 100644 --- a/src/librustc_data_structures/array_vec.rs +++ b/src/librustc_data_structures/array_vec.rs @@ -138,7 +138,7 @@ impl<A: Array> ArrayVec<A> { // Use the borrow in the IterMut to indicate borrowing behavior of the // whole Drain iterator (like &mut T). let range_slice = { - let arr = &mut self.values as &mut [ManuallyDrop<_>]; + let arr = &mut self.values as &mut [ManuallyDrop<<A as Array>::Element>]; slice::from_raw_parts_mut(arr.as_mut_ptr().offset(start as isize), end - start) }; @@ -260,7 +260,8 @@ impl<'a, A: Array> Drop for Drain<'a, A> { let start = source_array_vec.len(); let tail = self.tail_start; { - let arr = &mut source_array_vec.values as &mut [ManuallyDrop<_>]; + let arr = + &mut source_array_vec.values as &mut [ManuallyDrop<<A as Array>::Element>]; let src = arr.as_ptr().offset(tail as isize); let dst = arr.as_mut_ptr().offset(start as isize); ptr::copy(src, dst, self.tail_len); diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs index ae9535139d9..165e1b0609b 100644 --- a/src/libstd/sys/windows/fs.rs +++ b/src/libstd/sys/windows/fs.rs @@ -770,7 +770,7 @@ fn symlink_junction_inner(target: &Path, junction: &Path) -> io::Result<()> { let mut data = [0u8; c::MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; let db = data.as_mut_ptr() as *mut c::REPARSE_MOUNTPOINT_DATA_BUFFER; - let buf = &mut (*db).ReparseTarget as *mut _; + let buf = &mut (*db).ReparseTarget as *mut c::WCHAR; let mut i = 0; // FIXME: this conversion is very hacky let v = br"\??\"; |
