summaryrefslogtreecommitdiff
path: root/dhall/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/lib.rs2
-rw-r--r--dhall/src/parser.rs7
2 files changed, 4 insertions, 5 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs
index e720ae1..9dbd3a6 100644
--- a/dhall/src/lib.rs
+++ b/dhall/src/lib.rs
@@ -1,6 +1,4 @@
#![feature(box_patterns)]
-#![feature(concat_idents)]
-#![feature(transpose_result)]
pub mod context;
mod core;
diff --git a/dhall/src/parser.rs b/dhall/src/parser.rs
index 47c520e..36e1726 100644
--- a/dhall/src/parser.rs
+++ b/dhall/src/parser.rs
@@ -208,10 +208,11 @@ macro_rules! match_children {
match_children!(@parse, $pairs $($rest)*);
};
(@parse, $pairs:expr, $x:ident? : $ty:ident $($rest:tt)*) => {
- let $x = $x.map($ty).transpose();
+ let $x = $x.map($ty);
let $x = match $x {
- Ok(x) => x,
- Err(e) => break Err(IterMatchError::Other(e)),
+ Some(Ok(x)) => Some(x),
+ Some(Err(e)) => break Err(IterMatchError::Other(e)),
+ None => None,
};
match_children!(@parse, $pairs $($rest)*);
};