Skip to content

Commit bf9096f

Browse files
committed
small correction to fmt::Pointer impl
the `expose_provenance` method does not require `T: Sized`
1 parent 6c38c60 commit bf9096f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/fmt/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2478,8 +2478,7 @@ impl Display for char {
24782478
#[stable(feature = "rust1", since = "1.0.0")]
24792479
impl<T: ?Sized> Pointer for *const T {
24802480
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
2481-
// Cast is needed here because `.expose_provenance()` requires `T: Sized`.
2482-
pointer_fmt_inner((*self as *const ()).expose_provenance(), f)
2481+
pointer_fmt_inner(self.expose_provenance(), f)
24832482
}
24842483
}
24852484

0 commit comments

Comments
 (0)