We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f548a38 + a30b0a6 commit e725c04Copy full SHA for e725c04
src/libcore/mem/mod.rs
@@ -109,8 +109,9 @@ pub use crate::intrinsics::transmute;
109
/// [ub]: ../../reference/behavior-considered-undefined.html
110
/// [`ManuallyDrop`]: struct.ManuallyDrop.html
111
#[inline]
112
+#[rustc_const_unstable(feature = "const_forget", issue = "69616")]
113
#[stable(feature = "rust1", since = "1.0.0")]
-pub fn forget<T>(t: T) {
114
+pub const fn forget<T>(t: T) {
115
ManuallyDrop::new(t);
116
}
117
0 commit comments