summaryrefslogtreecommitdiff
path: root/dhall/src/syntax/ast
diff options
context:
space:
mode:
authorNadrieril2020-06-25 16:47:59 +0100
committerGitHub2020-06-25 16:47:59 +0100
commitb63e00cebff4a8b53c23faac2881fae640da7db2 (patch)
tree36a8786cb158c676ebb32bbb8255a93297d07091 /dhall/src/syntax/ast
parent4c80de149200a86f7fc13c725160dafb35d0ac08 (diff)
parentb9c7bf6744fcbf30b988a50fd0b8c28e23f22d29 (diff)
Merge pull request #171 from Nadrieril/catchup-spec
Diffstat (limited to 'dhall/src/syntax/ast')
-rw-r--r--dhall/src/syntax/ast/span.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/dhall/src/syntax/ast/span.rs b/dhall/src/syntax/ast/span.rs
index e250602..ab3279b 100644
--- a/dhall/src/syntax/ast/span.rs
+++ b/dhall/src/syntax/ast/span.rs
@@ -66,6 +66,12 @@ impl Span {
end: max(x.end, y.end),
})
}
+ (Parsed(_), Parsed(_)) => panic!(
+ "Tried to union incompatible spans: {:?} and {:?}",
+ self, other
+ ),
+ (Parsed(x), _) => Parsed(x.clone()),
+ (_, Parsed(x)) => Parsed(x.clone()),
_ => panic!(
"Tried to union incompatible spans: {:?} and {:?}",
self, other