From eac1e30bd8620446c123b4f0d2c0ea054acdee56 Mon Sep 17 00:00:00 2001 From: Antoine PLASKOWSKI Date: Sat, 9 Jul 2022 23:28:22 +0200 Subject: [PATCH] Add T to PhantomData impl Debug --- library/core/src/fmt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 6c3bb7229e51f..a3b3ced779fdb 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -2598,7 +2598,7 @@ impl Debug for () { #[stable(feature = "rust1", since = "1.0.0")] impl Debug for PhantomData { fn fmt(&self, f: &mut Formatter<'_>) -> Result { - f.debug_struct("PhantomData").finish() + write!(f, "PhantomData<{}>", crate::any::type_name::()) } }