checkpoint; builds again
This commit is contained in:
@@ -41,6 +41,8 @@ pub enum BackendError {
|
||||
Write(#[from] cranelift_object::object::write::Error),
|
||||
#[error("Invalid type cast from {from} to {to}")]
|
||||
InvalidTypeCast { from: PrimitiveType, to: Type },
|
||||
#[error("Unknown string constant '{0}")]
|
||||
UnknownString(ArcIntern<String>),
|
||||
}
|
||||
|
||||
impl From<BackendError> for Diagnostic<usize> {
|
||||
@@ -69,6 +71,8 @@ impl From<BackendError> for Diagnostic<usize> {
|
||||
BackendError::InvalidTypeCast { from, to } => Diagnostic::error().with_message(
|
||||
format!("Internal error trying to cast from {} to {}", from, to),
|
||||
),
|
||||
BackendError::UnknownString(str) => Diagnostic::error()
|
||||
.with_message(format!("Unknown string found trying to compile: '{}'", str)),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,6 +123,11 @@ impl PartialEq for BackendError {
|
||||
} => from1 == from2 && to1 == to2,
|
||||
_ => false,
|
||||
},
|
||||
|
||||
BackendError::UnknownString(a) => match other {
|
||||
BackendError::UnknownString(b) => a == b,
|
||||
_ => false,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user