File tree 1 file changed +10
-11
lines changed
1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ use ptr;
19
19
20
20
pub use intrinsics:: transmute;
21
21
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
+
22
32
/// Returns the size of a type in bytes.
23
33
#[ inline]
24
34
#[ stable]
@@ -337,17 +347,6 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
337
347
#[ stable]
338
348
pub fn drop < T > ( _x : T ) { }
339
349
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
-
351
350
/// Interprets `src` as `&U`, and then reads `src` without moving the contained
352
351
/// value.
353
352
///
You can’t perform that action at this time.
0 commit comments