impl fmt::Pointer for &T and &mut T
This commit is contained in:
parent
49e11630fa
commit
254c155fca
1 changed files with 11 additions and 1 deletions
|
|
@ -1200,7 +1200,17 @@ impl<T> Pointer for *T {
|
|||
}
|
||||
impl<T> Pointer for *mut T {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
secret_pointer(&(*self as *T), f)
|
||||
secret_pointer::<*T>(&(*self as *T), f)
|
||||
}
|
||||
}
|
||||
impl<'a, T> Pointer for &'a T {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
secret_pointer::<*T>(&(&**self as *T), f)
|
||||
}
|
||||
}
|
||||
impl<'a, T> Pointer for &'a mut T {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
secret_pointer::<*T>(&(&**self as *T), f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue