Files
rust/tests/ui/crashes/single-match-else.rs
Guillaume Gomez f666fd6417 Update UI tests
2025-02-15 13:38:16 +01:00

14 lines
252 B
Rust

//@ 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);
}