]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/mir_codegen_switchint.rs
Rollup merge of #103418 - Aaron1011:macro-semicolon-future-incompat, r=davidtwco
[rust.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 }