From 2892302aef73715678f604ccbbf8e371bdf0ab4e Mon Sep 17 00:00:00 2001 From: Daria Sukhonina Date: Fri, 3 May 2024 17:02:26 +0300 Subject: [PATCH] Add safety comment to fix tidy --- library/core/src/future/async_drop.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/future/async_drop.rs b/library/core/src/future/async_drop.rs index ea7e2f52ba1d..25138c445c43 100644 --- a/library/core/src/future/async_drop.rs +++ b/library/core/src/future/async_drop.rs @@ -259,6 +259,8 @@ async unsafe fn either, M: IntoFuture, T #[cfg(not(bootstrap))] #[lang = "async_drop_deferred_drop_in_place"] async unsafe fn deferred_drop_in_place(to_drop: *mut T) { + // SAFETY: same safety requirements as with drop_in_place (implied by + // function's name) unsafe { crate::ptr::drop_in_place(to_drop) } }