about summary refs log tree commit diff
path: root/src/test/compile-fail/feature-gate-slice-patterns.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-25 03:43:31 +0000
committerbors <bors@rust-lang.org>2015-04-25 03:43:31 +0000
commita40261ac91dd80b21830cc94de6132744e0c5078 (patch)
tree023666901a4f040367389290d46a22c97ae7d8ce /src/test/compile-fail/feature-gate-slice-patterns.rs
parentf9e53c7f2c8285f3422ac7ac091349ce572c4baa (diff)
parent23b1d172a8245f810f179d939488325fff005158 (diff)
downloadrust-a40261ac91dd80b21830cc94de6132744e0c5078.tar.gz
rust-a40261ac91dd80b21830cc94de6132744e0c5078.zip
Auto merge of #24798 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #24662, #24722, #24725, #24729, #24736, #24749, #24751, #24766, #24769, #24772, #24775, #24790
- Failed merges: #24760
Diffstat (limited to 'src/test/compile-fail/feature-gate-slice-patterns.rs')
-rw-r--r--src/test/compile-fail/feature-gate-slice-patterns.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/feature-gate-slice-patterns.rs b/src/test/compile-fail/feature-gate-slice-patterns.rs
new file mode 100644
index 00000000000..625cb2d3515
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-slice-patterns.rs
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that slice pattern syntax is gated by `slice_patterns` feature gate
+
+fn main() {
+    let x = [1, 2, 3, 4, 5];
+    match x {
+        [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental
+    }
+}