about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThom Chiovoloni <thom@shift.click>2022-12-13 20:53:14 -0800
committerThom Chiovoloni <thom@shift.click>2022-12-13 20:53:14 -0800
commitf2d03667914528a672c476b3718b0a0ead0736da (patch)
tree0f847404af6ca21d5894724962ccad454cf0cea5
parent918d0ac38e8c3bcf4fb5ee2241fb14979c73c312 (diff)
downloadrust-f2d03667914528a672c476b3718b0a0ead0736da.tar.gz
rust-f2d03667914528a672c476b3718b0a0ead0736da.zip
Use `expose_addr()` in `fmt::Pointer`
-rw-r--r--library/core/src/fmt/mod.rs4
1 files changed, 2 insertions, 2 deletions
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 @@ 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)
     }
 }