@@ -291,6 +291,7 @@ pub fn variant_opt(bcx: block, pat_id: ast::node_id)
291291 }
292292 ::core::util::unreachable();
293293 }
294+ ast::def_fn(*) |
294295 ast::def_struct(_) => {
295296 return lit(UnitLikeStructLit(pat_id));
296297 }
@@ -818,6 +819,7 @@ pub fn get_options(bcx: block, m: &[@Match], col: uint) -> ~[Opt] {
818819 // This could be one of: a tuple-like enum variant, a
819820 // struct-like enum variant, or a struct.
820821 match ccx.tcx.def_map.find(&cur.id) {
822+ Some(&ast::def_fn(*)) |
821823 Some(&ast::def_variant(*)) => {
822824 add_to_set(ccx.tcx, &mut found,
823825 variant_opt(bcx, cur.id));
@@ -1011,6 +1013,7 @@ pub fn any_tuple_struct_pat(bcx: block, m: &[@Match], col: uint) -> bool {
10111013 match pat.node {
10121014 ast::pat_enum(_, Some(_)) => {
10131015 match bcx.tcx().def_map.find(&pat.id) {
1016+ Some(&ast::def_fn(*)) |
10141017 Some(&ast::def_struct(*)) => true,
10151018 _ => false
10161019 }
@@ -1780,6 +1783,7 @@ pub fn bind_irrefutable_pat(bcx: block,
17801783 }
17811784 }
17821785 }
1786+ Some ( & ast:: def_fn ( * ) ) |
17831787 Some ( & ast:: def_struct ( * ) ) => {
17841788 match * sub_pats {
17851789 None => {
0 commit comments