summaryrefslogtreecommitdiff
path: root/dhall/src/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/syntax')
-rw-r--r--dhall/src/syntax/ast/expr.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs
index ce0a3d2..8023771 100644
--- a/dhall/src/syntax/ast/expr.rs
+++ b/dhall/src/syntax/ast/expr.rs
@@ -257,10 +257,12 @@ impl Expr {
}
}
-pub fn trivial_result<T>(x: Result<T, !>) -> T {
+// Empty enum to indicate that no error can occur
+enum X {}
+fn trivial_result<T>(x: Result<T, X>) -> T {
match x {
Ok(x) => x,
- Err(e) => e,
+ Err(e) => match e {},
}
}