Improve type error message for non-constructor in pattern

This commit is contained in:
Tim Chevalier 2011-06-01 18:15:12 -07:00
parent 1402cd101b
commit 24c9d7e5f8

View file

@ -1128,8 +1128,8 @@ mod pushdown {
alt (struct(scx.fcx.ccx.tcx, expected)) {
case (ty::ty_tag(_, ?tps)) { tag_tps = tps; }
case (_) {
log_err "tag pattern type not actually a tag?!";
fail;
scx.fcx.ccx.tcx.sess.span_err(pat.span,
"Non-constructor used in a pattern");
}
}