small correction to fmt::Pointer impl
the `expose_provenance` method does not require `T: Sized`
This commit is contained in:
parent
9c3bc805dd
commit
35f209361f
1 changed files with 1 additions and 2 deletions
|
|
@ -2478,8 +2478,7 @@ 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 `.expose_provenance()` requires `T: Sized`.
|
||||
pointer_fmt_inner((*self as *const ()).expose_provenance(), f)
|
||||
pointer_fmt_inner(self.expose_provenance(), f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue