1
Fork 0

constify mem::forget

This commit is contained in:
DutchGhost 2020-03-01 20:42:35 +01:00
parent 360e42de82
commit ae70ab071a

View file

@ -109,6 +109,7 @@ pub use crate::intrinsics::transmute;
/// [ub]: ../../reference/behavior-considered-undefined.html /// [ub]: ../../reference/behavior-considered-undefined.html
/// [`ManuallyDrop`]: struct.ManuallyDrop.html /// [`ManuallyDrop`]: struct.ManuallyDrop.html
#[inline] #[inline]
#[rustc_const_unstable(feature = "const_forget", issue = "69616")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub fn forget<T>(t: T) { pub fn forget<T>(t: T) {
ManuallyDrop::new(t); ManuallyDrop::new(t);