From a065096ff40f7910fd58aa36a76be6cb1c5f1d4d Mon Sep 17 00:00:00 2001
From: Dodo <kasper199914@gmail.com>
Date: Tue, 30 Jun 2020 10:53:11 +0200
Subject: [PATCH] stabilize const mem::forget

---
 src/libcore/mem/mod.rs             | 2 +-
 src/libcore/tests/lib.rs           | 1 -
 src/test/ui/consts/const_forget.rs | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs
index 46e6ea7cd1866..84f8f1f77909b 100644
--- a/src/libcore/mem/mod.rs
+++ b/src/libcore/mem/mod.rs
@@ -142,7 +142,7 @@ pub use crate::intrinsics::transmute;
 /// [ub]: ../../reference/behavior-considered-undefined.html
 /// [`ManuallyDrop`]: struct.ManuallyDrop.html
 #[inline]
-#[rustc_const_unstable(feature = "const_forget", issue = "69616")]
+#[rustc_const_stable(feature = "const_forget", since = "1.46.0")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const fn forget<T>(t: T) {
     ManuallyDrop::new(t);
diff --git a/src/libcore/tests/lib.rs b/src/libcore/tests/lib.rs
index c60ce8ec837d5..772ec079ef2dc 100644
--- a/src/libcore/tests/lib.rs
+++ b/src/libcore/tests/lib.rs
@@ -40,7 +40,6 @@
 #![feature(const_raw_ptr_deref)]
 #![feature(never_type)]
 #![feature(unwrap_infallible)]
-#![feature(const_forget)]
 #![feature(option_unwrap_none)]
 #![feature(peekable_next_if)]
 #![feature(partition_point)]
diff --git a/src/test/ui/consts/const_forget.rs b/src/test/ui/consts/const_forget.rs
index 2dcb72a5a09cb..ec7dde8c9ecdc 100644
--- a/src/test/ui/consts/const_forget.rs
+++ b/src/test/ui/consts/const_forget.rs
@@ -1,7 +1,5 @@
 // check-pass
 
-#![feature(const_forget)]
-
 use std::mem::forget;
 
 const _: () = forget(0i32);