Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
binding
/
match-enum-struct-1.rs
blob: 57801346905637cacb68a64b7b0afa946c2f9c44 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
dead_code
)]
enum
E
{
Foo
{
f
:
isize
},
Bar
}
pub
fn
main
()
{
let
e
=
E
::
Foo
{
f
:
1
};
match
e
{
E
::
Foo
{..}
=>
(),
_
=>
panic
!(),
}
match
e
{
E
::
Foo
{
f
:
_f
}
=>
(),
_
=>
panic
!(),
}
}