Skip to content

Commit cd235d4

Browse files
committed
core: Make intrinsics::forget unsafe, too
1 parent 646f16d commit cd235d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/unstable/intrinsics.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ pub extern "rust-intrinsic" {
5050
#[cfg(not(stage0))]
5151
pub unsafe fn uninit<T>() -> T;
5252

53-
pub fn forget<T>(_: T) -> ();
53+
/// forget is unsafe because the caller is responsible for
54+
/// ensuring the argument is deallocated already
55+
pub unsafe fn forget<T>(_: T) -> ();
5456

5557
pub fn needs_drop<T>() -> bool;
5658

0 commit comments

Comments
 (0)