summaryrefslogtreecommitdiffstats
path: root/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs')
-rw-r--r--src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs
new file mode 100644
index 000000000..dac973473
--- /dev/null
+++ b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs
@@ -0,0 +1,7 @@
+#![feature(exclusive_range_pattern)]
+
+fn main() {
+ let xs = [13, 1, 5, 2, 3, 1, 21, 8];
+ let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs;
+ //~^ `X..` patterns in slices are experimental
+}