From e24fe5b8cfabb65a763a67403e7b0c91aaa848a9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 18 Mar 2015 19:51:10 -0700 Subject: 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. --- src/libcoretest/ptr.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libcoretest') 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]); } -- cgit 1.4.1-3-g733a5