Forbid pattern-matching structs until the next snapshot (#3215)

This commit is contained in:
Ben Blum 2012-08-17 15:23:19 -04:00
parent 09cf5c1de4
commit 89c2a9f4cf
2 changed files with 3 additions and 0 deletions

View file

@ -283,6 +283,8 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
for fields.each |field| {
match field_map.find(field.ident) {
some(index) => {
tcx.sess.span_err(pat.span, ~"Pattern-matching structs \
is not allowed (#3215) until the next snapshot.");
let class_field = class_fields[index];
let field_type = ty::lookup_field_type(tcx,
class_id,

View file

@ -1,3 +1,4 @@
// xfail-test
struct Foo {
x: int;
y: int;