]> git.proxmox.com Git - rustc.git/blob - tests/ui/mir/mir_codegen_switchint.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / mir / mir_codegen_switchint.rs
1 // run-pass
2 pub fn foo(x: i8) -> i32 {
3 match x {
4 1 => 0,
5 _ => 1,
6 }
7 }
8
9 fn main() {
10 assert_eq!(foo(0), 1);
11 assert_eq!(foo(1), 0);
12 }