10 lines
216 B
Rust
10 lines
216 B
Rust
type foo = {a: int, b: uint};
|
|
enum bar { u(@foo), w(int), }
|
|
|
|
fn main() {
|
|
assert (match u(@{a: 10, b: 40u}) {
|
|
u(@{a: a, b: b}) => { a + (b as int) }
|
|
_ => { 66 }
|
|
} == 50);
|
|
}
|