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

12 lines
194 B
Rust
Raw Normal View History

2018-07-30 04:33:44 -05:00
#![feature(tool_lints)]
2017-09-18 05:47:33 -05:00
2018-07-30 04:33:44 -05:00
#![warn(clippy::single_match_else)]
fn main() {
let n = match (42, 43) {
(42, n) => n,
_ => panic!("typeck error"),
};
assert_eq!(n, 43);
}