rust-clippy/tests/run-pass/single-match-else.rs
2018-08-29 11:08:29 -07:00

11 lines
194 B
Rust

#![feature(tool_lints)]
#![warn(clippy::single_match_else)]
fn main() {
let n = match (42, 43) {
(42, n) => n,
_ => panic!("typeck error"),
};
assert_eq!(n, 43);
}