about summary refs log tree commit diff
path: root/src/test/compile-fail/let-destruct-refutable.rs
blob: d1796da90374b950d4b85dbe2647c60449f1f460 (plain)
1
2
3
4
5
6
7
8
// error-pattern:refutable pattern

tag xx { xx(int); yy; }

fn main() {
    let @{x: xx(x), y: y} = @{x: xx(10), y: 20};
    assert (x + y == 30);
}