From 17f8361a38c16c71d1c5d30d3a900a931477659a Mon Sep 17 00:00:00 2001 From: Pavel Grigorenko Date: Fri, 26 Jul 2024 22:11:16 +0300 Subject: [PATCH] rustc_type_ir: derive Debug for UnevaluatedConst --- compiler/rustc_type_ir/src/const_kind.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/compiler/rustc_type_ir/src/const_kind.rs b/compiler/rustc_type_ir/src/const_kind.rs index adfbddf0009bb..76b70e4ad443f 100644 --- a/compiler/rustc_type_ir/src/const_kind.rs +++ b/compiler/rustc_type_ir/src/const_kind.rs @@ -59,7 +59,7 @@ impl fmt::Debug for ConstKind { } /// An unevaluated (potentially generic) constant used in the type-system. -#[derive_where(Clone, Copy, Hash, PartialEq, Eq; I: Interner)] +#[derive_where(Clone, Copy, Debug, Hash, PartialEq, Eq; I: Interner)] #[derive(TypeVisitable_Generic, TypeFoldable_Generic, Lift_Generic)] #[cfg_attr(feature = "nightly", derive(TyDecodable, TyEncodable, HashStable_NoContext))] pub struct UnevaluatedConst { @@ -74,15 +74,6 @@ impl UnevaluatedConst { } } -impl fmt::Debug for UnevaluatedConst { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UnevaluatedConst") - .field("def", &self.def) - .field("args", &self.args) - .finish() - } -} - rustc_index::newtype_index! { /// A **`const`** **v**ariable **ID**. #[encodable]