rust-clippy/tests/run-pass/single-match-else.rs

12 lines
163 B
Rust
Raw Normal View History

2017-09-18 10:47:33 +00:00
#![warn(single_match_else)]
fn main() {
let n = match (42, 43) {
(42, n) => n,
_ => panic!("typeck error"),
};
assert_eq!(n, 43);
}