Skip to content

Commit

Permalink
stabilize const mem::forget
Browse files Browse the repository at this point in the history
  • Loading branch information
DutchGhost committed Jun 30, 2020
1 parent a1528c4 commit a065096
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/libcore/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/consts/const_forget.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// check-pass

#![feature(const_forget)]

use std::mem::forget;

const _: () = forget(0i32);
Expand Down

0 comments on commit a065096

Please sign in to comment.