Add unique feature in Box::from_unique docs

This commit is contained in:
Nikolai Vazquez
2017-10-06 19:21:22 -04:00
parent 5af88ee996
commit 22298b8240

View File

@@ -288,9 +288,13 @@ impl<T: ?Sized> Box<T> {
/// # Examples
///
/// ```
/// #![feature(unique)]
///
/// fn main() {
/// let x = Box::new(5);
/// let ptr = Box::into_unique(x);
/// let x = unsafe { Box::from_unique(ptr) };
/// }
/// ```
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
issue = "27730")]