Add unique feature in Box::from_unique docs
This commit is contained in:
@@ -288,9 +288,13 @@ impl<T: ?Sized> Box<T> {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// #![feature(unique)]
|
||||||
|
///
|
||||||
|
/// fn main() {
|
||||||
/// let x = Box::new(5);
|
/// let x = Box::new(5);
|
||||||
/// let ptr = Box::into_unique(x);
|
/// let ptr = Box::into_unique(x);
|
||||||
/// let x = unsafe { Box::from_unique(ptr) };
|
/// let x = unsafe { Box::from_unique(ptr) };
|
||||||
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
|
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
|
||||||
issue = "27730")]
|
issue = "27730")]
|
||||||
|
|||||||
Reference in New Issue
Block a user