2016-11-29 01:10:26 -06:00
|
|
|
#![deny(unreachable_patterns)]
|
|
|
|
|
2013-12-31 18:07:41 -06:00
|
|
|
struct Foo {
|
2015-01-08 04:54:35 -06:00
|
|
|
x: isize,
|
|
|
|
y: isize,
|
2013-12-31 18:07:41 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let a = Foo { x: 1, y: 2 };
|
|
|
|
match a {
|
2016-11-29 01:10:26 -06:00
|
|
|
Foo { x: _x, y: _y } => (),
|
2013-12-31 18:07:41 -06:00
|
|
|
Foo { .. } => () //~ ERROR unreachable pattern
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|