]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/intrinsics.rs
Deprecate items that accidentally weren't deprecated
[rust.git] / library / core / src / intrinsics.rs
index 634ed87b0910e69d4ca86d5aefcaa2ad0571534a..dc73e1b34e0e74b628f50d3e78d10aae555c485d 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