mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
211 B
Rust
15 lines
211 B
Rust
//@ run-pass
|
|
|
|
struct A(isize);
|
|
|
|
fn main() {
|
|
let x = match A(3) {
|
|
A(..) => 1
|
|
};
|
|
assert_eq!(x, 1);
|
|
let x = match A(4) {
|
|
A(1) => 1,
|
|
A(..) => 2
|
|
};
|
|
assert_eq!(x, 2);
|
|
}
|