diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-18 19:51:10 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-21 10:16:01 -0700 |
| commit | e24fe5b8cfabb65a763a67403e7b0c91aaa848a9 (patch) | |
| tree | 0269ac6808b1f38376bd7520c2771bae96c2a8b2 /src/libcoretest | |
| parent | ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61 (diff) | |
| download | rust-e24fe5b8cfabb65a763a67403e7b0c91aaa848a9.tar.gz rust-e24fe5b8cfabb65a763a67403e7b0c91aaa848a9.zip | |
std: Remove deprecated ptr functions
The method with which backwards compatibility was retained ended up leading to documentation that rustdoc didn't handle well and largely ended up confusing.
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/ptr.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcoretest/ptr.rs b/src/libcoretest/ptr.rs index 6a25c8be14e..adc15b9fbc2 100644 --- a/src/libcoretest/ptr.rs +++ b/src/libcoretest/ptr.rs @@ -35,18 +35,18 @@ fn test() { let v0 = vec![32000u16, 32001u16, 32002u16]; let mut v1 = vec![0u16, 0u16, 0u16]; - copy_memory(v1.as_mut_ptr().offset(1), - v0.as_ptr().offset(1), 1); + copy(v1.as_mut_ptr().offset(1), + v0.as_ptr().offset(1), 1); assert!((v1[0] == 0u16 && v1[1] == 32001u16 && v1[2] == 0u16)); - copy_memory(v1.as_mut_ptr(), - v0.as_ptr().offset(2), 1); + copy(v1.as_mut_ptr(), + v0.as_ptr().offset(2), 1); assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 0u16)); - copy_memory(v1.as_mut_ptr().offset(2), - v0.as_ptr(), 1); + copy(v1.as_mut_ptr().offset(2), + v0.as_ptr(), 1); assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 32000u16)); @@ -164,7 +164,7 @@ fn test_ptr_subtraction() { fn test_set_memory() { let mut xs = [0u8; 20]; let ptr = xs.as_mut_ptr(); - unsafe { set_memory(ptr, 5u8, xs.len()); } + unsafe { write_bytes(ptr, 5u8, xs.len()); } assert!(xs == [5u8; 20]); } |
