diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:26:24 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-23 15:26:24 -0700 |
| commit | aea822626fef66b6607bc50114b1fb6f8dcd148a (patch) | |
| tree | 5a3bd5fa42da582951d99db4efbde8f59ebfd47c /src/libcoretest | |
| parent | 6e0f1d3984b8cef2b27f029270f8bc18b87d14fc (diff) | |
| parent | e24fe5b8cfabb65a763a67403e7b0c91aaa848a9 (diff) | |
| download | rust-aea822626fef66b6607bc50114b1fb6f8dcd148a.tar.gz rust-aea822626fef66b6607bc50114b1fb6f8dcd148a.zip | |
rollup merge of #23503: alexcrichton/fix-ptr-docs
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]); } |
