summaryrefslogtreecommitdiffstats
path: root/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs')
-rw-r--r--src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs
new file mode 100644
index 000000000..6e7df3094
--- /dev/null
+++ b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem2.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+fn main() {
+ let xs = [13, 1, 5, 2, 3, 1, 21, 8];
+ if let [3..=14, ..] = xs {
+ /* this variant must pass for now, unfortunately.
+ * This test is included here to help inform a future plan for these.
+ */
+ };
+}