about summary refs log tree commit diff
path: root/tests/ui/match/issue-26251.rs
blob: b1a81fcf20920131d4f336d3ac5831374178b278 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-pass
#![allow(overlapping_range_endpoints)]

fn main() {
    let x = 'a';

    let y = match x {
        'a'..='b' if false => "one",
        'a' => "two",
        'a'..='b' => "three",
        _ => panic!("what?"),
    };

    assert_eq!(y, "two");
}