Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
run-pass
/
struct-pattern-matching.rs
blob: e5e26d0b442472149681995d429c44c7fe7e085e [
file
] [
log
] [
blame
]
struct
Foo
{
x
:
int
,
y
:
int
,
}
fn
main
()
{
let
a
=
Foo
{
x
:
1
,
y
:
2
};
match
a
{
Foo
{
x
:
x
,
y
:
y
}
=>
io
::
println
(
fmt
!(
"yes, %d, %d"
,
x
,
y
))
}
}