]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/ptr.rs
Auto merge of #35856 - phimuemue:master, r=brson
[rust.git] / src / libcore / ptr.rs
index f23b407bda4c45af4f830c7b3c1ad5267666779d..8c8925251e5cf4ef9d4c1a75aa6f0d8966fa8d4b 100644 (file)
@@ -137,21 +137,6 @@ pub unsafe fn read<T>(src: *const T) -> T {
     tmp
 }
 
-#[allow(missing_docs)]
-#[inline(always)]
-#[unstable(feature = "filling_drop",
-           reason = "may play a larger role in std::ptr future extensions",
-           issue = "5016")]
-pub unsafe fn read_and_drop<T>(dest: *mut T) -> T {
-    // Copy the data out from `dest`:
-    let tmp = read(&*dest);
-
-    // Now mark `dest` as dropped:
-    write_bytes(dest, mem::POST_DROP_U8, 1);
-
-    tmp
-}
-
 /// Overwrites a memory location with the given value without reading or
 /// dropping the old value.
 ///