rustc_type_ir: derive Debug for UnevaluatedConst

This commit is contained in:
Pavel Grigorenko 2024-07-26 22:11:16 +03:00
parent 1b72392f04
commit 17f8361a38

View File

@ -59,7 +59,7 @@ impl<I: Interner> fmt::Debug for ConstKind<I> {
}
/// 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<I: Interner> {
@ -74,15 +74,6 @@ impl<I: Interner> UnevaluatedConst<I> {
}
}
impl<I: Interner> fmt::Debug for UnevaluatedConst<I> {
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]