]> git.lizzy.rs Git - rust.git/commitdiff
Re-allow pattern-matching structs (#3215)
authorBen Blum <bblum@andrew.cmu.edu>
Fri, 17 Aug 2012 19:37:00 +0000 (15:37 -0400)
committerBen Blum <bblum@andrew.cmu.edu>
Mon, 20 Aug 2012 22:22:11 +0000 (18:22 -0400)
src/rustc/middle/typeck/check/alt.rs
src/test/run-pass/struct-pattern-matching.rs

index e1de3215495b2e0864152b08da3db301961de5b9..6cd6f5f53aa372bd3bdcee9eda25562ac49b6dd6 100644 (file)
@@ -283,8 +283,6 @@ fn matches(name: ast::ident, f: ty::field) -> bool {
         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,
index aa24e269959dcd24e460f3e145b3932070e66819..0a4f3b933c0ea461e1cfff9fb116028413ab9237 100644 (file)
@@ -1,4 +1,3 @@
-// xfail-test
 struct Foo {
     x: int;
     y: int;