diff --git a/library/core/src/mem/manually_drop.rs b/library/core/src/mem/manually_drop.rs index 334a4b7119a11..7d49da8509577 100644 --- a/library/core/src/mem/manually_drop.rs +++ b/library/core/src/mem/manually_drop.rs @@ -217,8 +217,9 @@ impl ManuallyDrop { /// #[must_use = "if you don't need the value, you can use `ManuallyDrop::drop` instead"] #[stable(feature = "manually_drop_take", since = "1.42.0")] + #[rustc_const_unstable(feature = "const_manually_drop_take", issue = "148773")] #[inline] - pub unsafe fn take(slot: &mut ManuallyDrop) -> T { + pub const unsafe fn take(slot: &mut ManuallyDrop) -> T { // SAFETY: we are reading from a reference, which is guaranteed // to be valid for reads. unsafe { ptr::read(&slot.value) }