about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/crashes/single-match-else.rs
blob: 2ef5dd891c565af5a95abf88bbc178216063c011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ check-pass

#![warn(clippy::single_match_else)]

//! Test for https://github.com/rust-lang/rust-clippy/issues/1588

fn main() {
    let n = match (42, 43) {
        (42, n) => n,
        _ => panic!("typeck error"),
    };
    assert_eq!(n, 43);
}