Sign in
android
/
platform
/
external
/
stg
/
HEAD
/
.
/
test_cases
/
info_tests
/
variant
/
negative_discriminant.rs
blob: 0a51235ce02f6b91ce67cec48d5ebc5745627372 [
file
] [
log
] [
blame
]
#[
repr
(
i64
)]
pub
enum
Foo
{
MinusTwo
(
u32
)
=
-
2
,
MinusOne
=
-
1
,
Zero
(
u32
),
}
#[
no_mangle
]
pub
fn
is_minus_one
(
foo
:
Foo
)
->
bool
{
match
foo
{
Foo
::
MinusOne
=>
true
,
_
=>
false
,
}
}