summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorBadel2 <2badel2@gmail.com>2017-09-21 12:14:14 +0200
committerBadel2 <2badel2@gmail.com>2017-09-22 22:05:46 +0200
commit54c4a830843d8de97d1dd3f936f9e3415bc96ef9 (patch)
tree6b00eca548df7533349a4ef6f2252594068bd84d /src/test/compile-fail
parent7aabf572789dcae24cc8ce247f7d86bcc5d49a17 (diff)
downloadrust-54c4a830843d8de97d1dd3f936f9e3415bc96ef9.tar.gz
rust-54c4a830843d8de97d1dd3f936f9e3415bc96ef9.zip
dotdoteq_in_patterns feature gate
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs b/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs
new file mode 100644
index 00000000000..1fb139bf07f
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 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.
+
+pub fn main() {
+    match 22 {
+        0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental
+        _ => {}
+    }
+}