mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Use expose_addr() in fmt::Pointer
This commit is contained in:
@@ -2471,8 +2471,8 @@ fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user