We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5af88ee commit 22298b8Copy full SHA for 22298b8
src/liballoc/boxed.rs
@@ -288,9 +288,13 @@ impl<T: ?Sized> Box<T> {
288
/// # Examples
289
///
290
/// ```
291
- /// let x = Box::new(5);
292
- /// let ptr = Box::into_unique(x);
293
- /// let x = unsafe { Box::from_unique(ptr) };
+ /// #![feature(unique)]
+ ///
+ /// fn main() {
294
+ /// let x = Box::new(5);
295
+ /// let ptr = Box::into_unique(x);
296
+ /// let x = unsafe { Box::from_unique(ptr) };
297
+ /// }
298
299
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
300
issue = "27730")]
0 commit comments