Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
consts
/
const-nullary-enum.rs
blob: f43e889e601a7a85f347c3dd3ee93489e8585c58 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
dead_code
)]
enum
Foo
{
Bar
,
Baz
,
Boo
,
}
static
X
:
Foo
=
Foo
::
Bar
;
pub
fn
main
()
{
match
X
{
Foo
::
Bar
=>
{}
Foo
::
Baz
|
Foo
::
Boo
=>
panic
!()
}
match
Y
{
Foo
::
Baz
=>
{}
Foo
::
Bar
|
Foo
::
Boo
=>
panic
!()
}
}
static
Y
:
Foo
=
Foo
::
Baz
;