From 56d3a824e46ce9976a017ef41c318a66444da99c Mon Sep 17 00:00:00 2001 From: Stjepan Glavina Date: Mon, 12 Nov 2018 18:36:49 +0100 Subject: [PATCH] Update docs --- src/libcore/mem.rs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index f612f89e0826..7fe195d63be7 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -143,25 +143,12 @@ pub fn forget(t: T) { ManuallyDrop::new(t); } -/// Takes ownership and "forgets" about the value **without running its destructor**. +/// Like [`forget`], but also accepts unsized values. /// -/// This function works exactly the same as [`forget`], except it also accepts unsized values. It -/// will never be stabilized and is only available because we haven't decided to relax the bounds -/// on [`forget`] just yet. +/// This function is just a shim intended to be removed when the `unsized_locals` feature gets +/// stabilized. /// /// [`forget`]: fn.forget.html -/// -/// # Examples -/// -/// ``` -/// #![feature(forget_unsized)] -/// -/// use std::mem; -/// -/// let f: Box = Box::new(|| ()); -/// let f = *f; -/// mem::forget_unsized(f); -/// ``` #[inline] #[cfg(not(stage0))] #[unstable(feature = "forget_unsized", issue = "0")]