summaryrefslogtreecommitdiff
path: root/src/eval/value.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-10 10:29:17 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-10 10:29:17 +0100
commit624471db619240f0eed849b92dff6a525ce7e547 (patch)
treeb6218c031019a78a99c7bb99fcbbe40918e6f2d7 /src/eval/value.rs
parent6e198bf7606847b0847487a4847d6a3ee3621d2d (diff)
Proper error messages for shorthands
Diffstat (limited to 'src/eval/value.rs')
-rw-r--r--src/eval/value.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 2d37b34f..d1f0be76 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -284,7 +284,7 @@ pub trait Type {
}
/// Cast from a value to a specific type.
-pub trait Cast<V>: Sized {
+pub trait Cast<V = Spanned<Value>>: Sized {
/// Check whether the value is castable to `Self`.
fn is(value: &V) -> bool;
@@ -415,7 +415,7 @@ impl Cast<Value> for Value {
}
}
-impl<T> Cast<Spanned<Value>> for T
+impl<T> Cast for T
where
T: Cast<Value>,
{
@@ -428,7 +428,7 @@ where
}
}
-impl<T> Cast<Spanned<Value>> for Spanned<T>
+impl<T> Cast for Spanned<T>
where
T: Cast<Value>,
{