about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/errors.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index 2cef36f757a1..416a4b23c0d1 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -223,9 +223,9 @@ pub struct Error {
     pub span: Span,
 }
 
-impl Display for Error {
+impl Display for ErrorKind {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        match &self.kind {
+        match &self {
             ErrorKind::Throw(msg) => write!(f, "error thrown: {}", msg),
             ErrorKind::Abort(msg) => write!(f, "evaluation aborted: {}", msg),
             ErrorKind::AssertionFailed => write!(f, "assertion failed"),
@@ -409,6 +409,12 @@ to a missing value in the attribute set(s) included via `with`."#,
     }
 }
 
+impl Display for Error {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.kind)
+    }
+}
+
 pub type EvalResult<T> = Result<T, Error>;
 
 /// Human-readable names for rnix syntaxes.