Add T to PhantomData impl Debug

This commit is contained in:
Antoine PLASKOWSKI 2022-07-09 23:28:22 +02:00
parent f893495e3d
commit eac1e30bd8

View File

@ -2598,7 +2598,7 @@ fn fmt(&self, f: &mut Formatter<'_>) -> Result {
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> Debug for PhantomData<T> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
f.debug_struct("PhantomData").finish()
write!(f, "PhantomData<{}>", crate::any::type_name::<T>())
}
}