summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)*