]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/intrinsics.rs
Auto merge of #82122 - bstrie:dep4real, r=dtolnay
[rust.git] / library / core / src / intrinsics.rs
index 4c2472ed82c5ef226ea11f7efe0b51d8b7a6673f..b5371d6b69dbb075d4585b756a9121d74044d35f 100644 (file)
 #[stable(feature = "drop_in_place", since = "1.8.0")]
 #[rustc_deprecated(
     reason = "no longer an intrinsic - use `ptr::drop_in_place` directly",
-    since = "1.18.0"
+    since = "1.52.0"
 )]
-pub use crate::ptr::drop_in_place;
+#[inline]
+pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
+    // SAFETY: see `ptr::drop_in_place`
+    unsafe { crate::ptr::drop_in_place(to_drop) }
+}
 
 extern "rust-intrinsic" {
     // N.B., these intrinsics take raw pointers because they mutate aliased