Restore ErrorType Debug impl

This commit is contained in:
Agus Zubiaga 2024-08-27 19:43:33 -03:00
parent ad27129fd7
commit b2bcf8f988
No known key found for this signature in database

View file

@ -3594,7 +3594,7 @@ pub enum Mismatch {
pub type DoesNotImplementAbility = Vec<(ErrorType, Symbol)>;
#[derive(PartialEq, Eq, Clone, Hash, Debug)]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ErrorType {
Infinite,
Type(Symbol, Vec<ErrorType>),
@ -3619,12 +3619,12 @@ pub enum ErrorType {
Error,
}
// impl std::fmt::Debug for ErrorType {
// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// // TODO remove clone
// write!(f, "{:?}", write_debug_error_type(self.clone()))
// }
// }
impl std::fmt::Debug for ErrorType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// TODO remove clone
write!(f, "{:?}", write_debug_error_type(self.clone()))
}
}
impl ErrorType {
pub fn unwrap_structural_alias(self) -> ErrorType {