Skip to content

Commit 4571172

Browse files
committed
rustc: Remove pushdown. 15 second improvement.
1 parent f54f279 commit 4571172

File tree

2 files changed

+30
-443
lines changed

2 files changed

+30
-443
lines changed

src/comp/middle/ty.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2574,9 +2574,11 @@ mod unify {
25742574

25752575
fn resolve_type_var(&ty_ctxt tcx, &@var_bindings vb, int vid)
25762576
-> fixup_result {
2577+
if ((vid as uint) >= ufind::set_count(vb.sets)) { ret fix_err(vid); }
2578+
25772579
auto root_id = ufind::find(vb.sets, vid as uint);
25782580
alt (smallintmap::find[t](vb.types, root_id)) {
2579-
case (none[t]) { ret fix_ok(mk_var(tcx, vid)); }
2581+
case (none[t]) { ret fix_err(vid); }
25802582
case (some[t](?rt)) { ret fixup_vars(tcx, vb, rt); }
25812583
}
25822584
}

0 commit comments

Comments
 (0)