Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
mir
/
mir_codegen_switchint.rs
blob: db0d05f6371320565b71da8f22ab2244b3ebdf45 [
file
] [
log
] [
blame
]
//@ run-pass
pub
fn
foo
(
x
:
i8
)
->
i32
{
match
x
{
1
=>
0
,
_
=>
1
,
}
}
fn
main
()
{
assert_eq
!(
foo
(
0
),
1
);
assert_eq
!(
foo
(
1
),
0
);
}