Skip to content

Commit aa3df17

Browse files
committed
Re-allow pattern-matching structs (#3215)
1 parent 08441fc commit aa3df17

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/rustc/middle/typeck/check/alt.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
283283
for fields.each |field| {
284284
match field_map.find(field.ident) {
285285
some(index) => {
286-
tcx.sess.span_err(pat.span, ~"Pattern-matching structs \
287-
is not allowed (#3215) until the next snapshot.");
288286
let class_field = class_fields[index];
289287
let field_type = ty::lookup_field_type(tcx,
290288
class_id,

src/test/run-pass/struct-pattern-matching.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test
21
struct Foo {
32
x: int;
43
y: int;

0 commit comments

Comments
 (0)