rust-clippy/tests/ui/crashes/single-match-else.rs

12 lines
236 B
Rust
Raw Normal View History

2018-07-30 09:33:44 +00:00
#![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);
}