]> git.lizzy.rs Git - rust.git/commitdiff
Update docs
authorStjepan Glavina <stjepang@gmail.com>
Mon, 12 Nov 2018 17:36:49 +0000 (18:36 +0100)
committerStjepan Glavina <stjepang@gmail.com>
Mon, 12 Nov 2018 17:36:49 +0000 (18:36 +0100)
src/libcore/mem.rs

index f612f89e0826f4a7ca38ace6e5879a42b2df4da3..7fe195d63be7a717b7e86f90b6f38cb0ce0ca1f8 100644 (file)
@@ -143,25 +143,12 @@ pub fn forget<T>(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<FnOnce()> = Box::new(|| ());
-/// let f = *f;
-/// mem::forget_unsized(f);
-/// ```
 #[inline]
 #[cfg(not(stage0))]
 #[unstable(feature = "forget_unsized", issue = "0")]