aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorTim Chevalier <[email protected]>2011-04-27 14:55:55 -0700
committerGraydon Hoare <[email protected]>2011-04-28 13:26:19 -0700
commit844fe207206b6708f2a7e05214857c92c4b7d28b (patch)
tree4182419dc16da692ddb0a554d9951e0ce6e99599 /src/comp/middle
parentSlightly more helpful error message for "null lib handle" (diff)
downloadrust-844fe207206b6708f2a7e05214857c92c4b7d28b.tar.xz
rust-844fe207206b6708f2a7e05214857c92c4b7d28b.zip
Fix some nested patterns in rustc
In rustc, nested patterns were potentially matching when they shouldn't match, because a loop index wasn't being incremented. Fixed it and added one test case.
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/trans.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 75c7aa84..a37308dd 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -3772,6 +3772,8 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval,
auto subpat_res = trans_pat_match(matched_cx, subpat,
llsubval, next_cx);
matched_cx = subpat_res.bcx;
+
+ i += 1;
}
}