File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff 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" ) ]
You can’t perform that action at this time.
0 commit comments