1
Fork 0

stabilize const mem::forget

This commit is contained in:
Dodo 2020-06-30 10:53:11 +02:00
parent a1528c432e
commit a065096ff4
3 changed files with 1 additions and 4 deletions

View file

@ -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);

View file

@ -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)]

View file

@ -1,7 +1,5 @@
// check-pass
#![feature(const_forget)]
use std::mem::forget;
const _: () = forget(0i32);