diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 48b6177434b..7e76ef42adc 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -2471,8 +2471,8 @@ fn fmt(&self, f: &mut Formatter<'_>) -> Result { #[stable(feature = "rust1", since = "1.0.0")] impl 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) } }