@@ -94,6 +94,7 @@ use mem;
|
||||
use clone::Clone;
|
||||
use intrinsics;
|
||||
use ops::Deref;
|
||||
use core::fmt;
|
||||
use option::Option::{self, Some, None};
|
||||
use marker::{PhantomData, Send, Sized, Sync};
|
||||
use nonzero::NonZero;
|
||||
@@ -570,3 +571,10 @@ impl<T:?Sized> Deref for Unique<T> {
|
||||
unsafe { mem::transmute(&*self.pointer) }
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T> fmt::Pointer for Unique<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Pointer::fmt(&*self.pointer, f)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user