File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ use ptr;
1919
2020pub use intrinsics:: transmute;
2121
22+ /// Moves a thing into the void.
23+ ///
24+ /// The forget function will take ownership of the provided value but neglect
25+ /// to run any required cleanup or memory management operations on it.
26+ ///
27+ /// This function is the unsafe version of the `drop` function because it does
28+ /// not run any destructors.
29+ #[ stable]
30+ pub use intrinsics:: forget;
31+
2232/// Returns the size of a type in bytes.
2333#[ inline]
2434#[ stable]
@@ -337,17 +347,6 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
337347#[ stable]
338348pub fn drop < T > ( _x : T ) { }
339349
340- /// Moves a thing into the void.
341- ///
342- /// The forget function will take ownership of the provided value but neglect
343- /// to run any required cleanup or memory management operations on it.
344- ///
345- /// This function is the unsafe version of the `drop` function because it does
346- /// not run any destructors.
347- #[ inline]
348- #[ stable]
349- pub unsafe fn forget < T > ( thing : T ) { intrinsics:: forget ( thing) }
350-
351350/// Interprets `src` as `&U`, and then reads `src` without moving the contained
352351/// value.
353352///
You can’t perform that action at this time.
0 commit comments