mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
13 lines
199 B
Rust
13 lines
199 B
Rust
//@ run-pass
|
|
struct S(u8, u16);
|
|
|
|
fn main() {
|
|
let s = S{1: 10, 0: 11};
|
|
match s {
|
|
S{0: a, 1: b, ..} => {
|
|
assert_eq!(a, 11);
|
|
assert_eq!(b, 10);
|
|
}
|
|
}
|
|
}
|