Skip to content

Commit

Permalink
Use expose_addr() in fmt::Pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Dec 14, 2022
1 parent 918d0ac commit f2d0366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit f2d0366

Please sign in to comment.