about summary refs log tree commit diff
path: root/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs')
-rw-r--r--tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs b/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs
new file mode 100644
index 00000000000..20f4d8f882a
--- /dev/null
+++ b/tests/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs
@@ -0,0 +1,11 @@
+#![feature(half_open_range_patterns_in_slices)]
+#![feature(exclusive_range_pattern)]
+
+fn main() {
+    match [5..4, 99..105, 43..44] {
+        [_, 99..] => {},
+        //~^ ERROR pattern requires 2 elements but array has 3
+        //~| ERROR mismatched types
+        _ => {},
+    }
+}