Skip to content

Commit 56d3a82

Browse files
author
Stjepan Glavina
committed
Update docs
1 parent 4d2934e commit 56d3a82

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/libcore/mem.rs

+3-16
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,12 @@ pub fn forget<T>(t: T) {
143143
ManuallyDrop::new(t);
144144
}
145145

146-
/// Takes ownership and "forgets" about the value **without running its destructor**.
146+
/// Like [`forget`], but also accepts unsized values.
147147
///
148-
/// This function works exactly the same as [`forget`], except it also accepts unsized values. It
149-
/// will never be stabilized and is only available because we haven't decided to relax the bounds
150-
/// on [`forget`] just yet.
148+
/// This function is just a shim intended to be removed when the `unsized_locals` feature gets
149+
/// stabilized.
151150
///
152151
/// [`forget`]: fn.forget.html
153-
///
154-
/// # Examples
155-
///
156-
/// ```
157-
/// #![feature(forget_unsized)]
158-
///
159-
/// use std::mem;
160-
///
161-
/// let f: Box<FnOnce()> = Box::new(|| ());
162-
/// let f = *f;
163-
/// mem::forget_unsized(f);
164-
/// ```
165152
#[inline]
166153
#[cfg(not(stage0))]
167154
#[unstable(feature = "forget_unsized", issue = "0")]

0 commit comments

Comments
 (0)