Use expose_addr() in fmt::Pointer
This commit is contained in:
parent
918d0ac38e
commit
f2d0366791
1 changed files with 2 additions and 2 deletions
|
|
@ -2471,8 +2471,8 @@ impl Display for char {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> Pointer for *const T {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
// Cast is needed here because `.addr()` requires `T: Sized`.
|
||||
pointer_fmt_inner((*self as *const ()).addr(), f)
|
||||
// Cast is needed here because `.expose_addr()` requires `T: Sized`.
|
||||
pointer_fmt_inner((*self as *const ()).expose_addr(), f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue