constify mem::forget
This commit is contained in:
parent
360e42de82
commit
ae70ab071a
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue