1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(exclusive_range_pattern)]
15 1_usize...5_usize => {}
16 _ => panic!("should match range"),
19 1_usize..5_usize => {}
20 _ => panic!("should match range start"),
23 6_usize...7_usize => panic!("shouldn't match range"),
27 6_usize..7_usize => panic!("shouldn't match range end"),
31 1_usize => panic!("should match non-first range"),
32 2_usize...6_usize => {}
33 _ => panic!("math is broken")
37 _ => panic!("should suppport char ranges")
41 _ => panic!("should match signed range")
45 _ => panic!("should match float range")
49 _ => panic!("should match negative float range")
52 0.0..3.5 => panic!("should not match the range end"),
57 _ => panic!("should match the range start"),