Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
binding
/
match-struct-0.rs
blob: 8f7dbbd9a0842431863cc689b7f01cdd5a0bdd97 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
struct
Foo
{
f
:
isize
,
}
pub
fn
main
()
{
let
f
=
Foo
{
f
:
1
};
match
f
{
Foo
{
f
:
0
}
=>
panic
!(),
Foo
{..}
=>
(),
}
match
f
{
Foo
{
f
:
0
}
=>
panic
!(),
Foo
{
f
:
_f
}
=>
(),
}
match
f
{
Foo
{
f
:
0
}
=>
panic
!(),
_
=>
(),
}
}