summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-04-08 19:18:49 +0200
committerNadrieril2019-04-08 19:18:49 +0200
commit350d92430a047a41f855c9f61d278c4476f04d78 (patch)
treefd59aaa94bdfde5b43b09102b5a71aa9a65c586b
parent47c0a3ca296a9b775275c2c7118a172b9f0bcc54 (diff)
Circumvent https://github.com/rust-lang/rust/issues/59803
-rw-r--r--dhall_core/src/lib.rs1
-rw-r--r--iter_patterns/src/lib.rs16
2 files changed, 10 insertions, 7 deletions
diff --git a/dhall_core/src/lib.rs b/dhall_core/src/lib.rs
index 9fddd1f..887f29e 100644
--- a/dhall_core/src/lib.rs
+++ b/dhall_core/src/lib.rs
@@ -1,6 +1,5 @@
#![feature(trace_macros)]
#![feature(slice_patterns)]
-#![feature(bind_by_move_pattern_guards)]
#![allow(
clippy::many_single_char_names,
clippy::should_implement_trait,
diff --git a/iter_patterns/src/lib.rs b/iter_patterns/src/lib.rs
index abd072e..657b538 100644
--- a/iter_patterns/src/lib.rs
+++ b/iter_patterns/src/lib.rs
@@ -1,4 +1,4 @@
-#![feature(slice_patterns, bind_by_move_pattern_guards)]
+#![feature(slice_patterns)]
/* Destructure an iterator using the syntax of slice_patterns.
* Wraps the match body in `Some` if there was a match; returns
@@ -174,11 +174,15 @@ macro_rules! match_vec {
)
};
(@make_filter; $variant:ident ($x:ident).., $($rest:tt)*) => {
- $x.iter()
- .all(|x| match x {
- $variant(_) => true,
- _ => false,
- })
+ {
+ // Circumvent https://github.com/rust-lang/rust/issues/59803
+ let is_all_variant = || $x.iter()
+ .all(|x| match x {
+ $variant(_) => true,
+ _ => false,
+ });
+ is_all_variant()
+ }
&&
$crate::match_vec!(@make_filter;
$($rest)*