Skip to content

Commit e725c04

Browse files
authored
Rollup merge of #69617 - DutchGhost:master, r=LukasKalbertodt
constify mem::forget implements #69616
2 parents f548a38 + a30b0a6 commit e725c04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/mem/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ pub use crate::intrinsics::transmute;
109109
/// [ub]: ../../reference/behavior-considered-undefined.html
110110
/// [`ManuallyDrop`]: struct.ManuallyDrop.html
111111
#[inline]
112+
#[rustc_const_unstable(feature = "const_forget", issue = "69616")]
112113
#[stable(feature = "rust1", since = "1.0.0")]
113-
pub fn forget<T>(t: T) {
114+
pub const fn forget<T>(t: T) {
114115
ManuallyDrop::new(t);
115116
}
116117

0 commit comments

Comments
 (0)