rust/src/test/compile-fail/let-destruct-refutable.rs

12 lines
152 B
Rust
Raw Normal View History

2011-08-01 15:46:17 +02:00
// error-pattern:refutable pattern
tag xx {
xx(int);
yy;
}
fn main() {
let @{x:xx(x), y} = @{x: xx(10), y: 20};
assert x + y == 30;
}