Sign in
android
/
platform
/
external
/
stg
/
HEAD
/
.
/
test_cases
/
info_tests
/
variant
/
simple.rs
blob: 5f080ec2366b323e2e9eb689700b3b8eb2eb9ff4 [
file
] [
log
] [
blame
]
#[
repr
(
u8
)]
pub
enum
Foo
{
Unit
,
TwoU32s
(
u32
,
u32
),
ThreeI16s
{
x
:
i16
,
y
:
i16
,
z
:
i16
},
}
#[
no_mangle
]
pub
fn
is_unit
(
foo
:
Foo
)
->
bool
{
match
foo
{
Foo
::
Unit
=>
true
,
_
=>
false
,
}
}