Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Stjepan Glavina committed Nov 12, 2018
1 parent 4d2934e commit 56d3a82
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 56d3a82

Please sign in to comment.