mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
357 B
Rust
15 lines
357 B
Rust
enum E {
|
|
A(u8, u8),
|
|
}
|
|
|
|
fn main() {
|
|
let e = E::A(2, 3);
|
|
match e {
|
|
E::A(x @ ..) => {
|
|
//~^ ERROR: `x @` is not allowed in a tuple struct
|
|
//~| ERROR: `..` patterns are not allowed here
|
|
//~| ERROR: this pattern has 1 field, but the corresponding tuple variant has 2 fields
|
|
x
|
|
}
|
|
};
|
|
}
|