librustc: Implement tuple struct constants. r=brson

This commit is contained in:
Patrick Walton 2012-11-30 16:29:28 -08:00
parent 5b5a0df7ee
commit 8fa306a0ad
3 changed files with 51 additions and 6 deletions

View file

@ -0,0 +1,13 @@
struct Bar(int, int);
const X: Bar = Bar(1, 2);
fn main() {
match X {
Bar(x, y) => {
assert x == 1;
assert y == 2;
}
}
}