File tree 1 file changed +3
-16
lines changed
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) {
143
143
ManuallyDrop :: new ( t) ;
144
144
}
145
145
146
- /// Takes ownership and "forgets" about the value **without running its destructor** .
146
+ /// Like [`forget`], but also accepts unsized values .
147
147
///
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.
151
150
///
152
151
/// [`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
- /// ```
165
152
#[ inline]
166
153
#[ cfg( not( stage0) ) ]
167
154
#[ unstable( feature = "forget_unsized" , issue = "0" ) ]
You can’t perform that action at this time.
0 commit comments