Sign in
gnu
/
gcc.git
/
refs/heads/master
/
.
/
gcc
/
testsuite
/
rust
/
execute
/
torture
/
struct-pattern-match.rs
blob: 6aec51f93fe06fe06a9b2e172a54b22ca14e3052 [
file
] [
log
] [
blame
]
enum
Foo
{
A
{
x
:
i32
},
B
{
y
:
i32
}
}
fn
main
()
->
i32
{
let
x
=
Foo
::
A
{
x
:
12
};
match
x
{
Foo
::
A
{
x
:
10
}
=>
1
,
Foo
::
B
{
y
:
11
}
=>
2
,
Foo
::
A
{
x
:
abc
}
=>
{
abc
-
12
}
}
}