1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 #![feature(exclusive_range_pattern)]
11 #![warn(clippy::match_overlapping_arm)]
12 #![allow(clippy::redundant_pattern_matching)]
14 /// Tests for match_overlapping_arm
20 0...10 => println!("0 ... 10"),
21 0...11 => println!("0 ... 11"),
26 0...5 => println!("0 ... 5"),
27 6...7 => println!("6 ... 7"),
28 FOO...11 => println!("0 ... 11"),
34 0...5 => println!("0 ... 5"),
40 0...2 => println!("0 ... 2"),
45 0...10 => println!("0 ... 10"),
46 11...50 => println!("11 ... 50"),
52 0..2 => println!("0 .. 2"),
57 0..10 => println!("0 .. 10"),
58 10..50 => println!("10 .. 50"),
63 0..11 => println!("0 .. 11"),
64 0...11 => println!("0 ... 11"),
68 if let None = Some(42) {
70 } else if let None = Some(42) {
71 // another nothing :-)