Skip to content

Commit 4590bd5

Browse files
committed
---
yaml --- r: 4705 b: refs/heads/master c: e3d5b8a h: refs/heads/master i: 4703: 141540b v: v3
1 parent e73b1e3 commit 4590bd5

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 42034f5e345838e1ae5b26c36326289b72b467f0
2+
refs/heads/master: e3d5b8a8d5c2009fe5abfc68d54cc6ba1f99baea

trunk/src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ fn find_pre_post_expr(fcx: &fn_ctxt, e: @expr) {
596596
none. { clear_pp(expr_pp(fcx.ccx, e)); }
597597
}
598598
}
599+
expr_uniq(sub) { find_pre_post_exprs(fcx, ~[sub], e.id); }
599600
}
600601
}
601602

trunk/src/comp/middle/ty.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ fn walk_ty(cx: &ctxt, walker: ty_walk, ty: t) {
704704
}
705705
ty_var(_) {/* no-op */ }
706706
ty_param(_,_) {/* no-op */ }
707+
ty_uniq(sub) { walk_ty(cx, walker, sub); }
707708
}
708709
walker(ty);
709710
}
@@ -1232,6 +1233,7 @@ fn type_has_dynamic_size(cx: &ctxt, ty: &t) -> bool {
12321233
ty_param(_,_) { ret true; }
12331234
ty_type. { ret false; }
12341235
ty_native(_) { ret false; }
1236+
ty_uniq(_) { ret false; }
12351237
}
12361238
}
12371239

@@ -1583,6 +1585,11 @@ fn hash_type_structure(st: &sty) -> uint {
15831585
for c: @type_constr in cs { h += h << 5u + hash_type_constr(h, c); }
15841586
ret h;
15851587
}
1588+
ty_uniq(t) {
1589+
let h = 37u;
1590+
h += h << 5u + hash_ty(t);
1591+
ret h;
1592+
}
15861593
}
15871594
}
15881595

@@ -1823,6 +1830,12 @@ fn equal_type_structures(a: &sty, b: &sty) -> bool {
18231830
_ { ret false; }
18241831
}
18251832
}
1833+
ty_uniq(t_a) {
1834+
alt b {
1835+
ty_uniq(t_b) { ret t_a == t_b; }
1836+
_ { ret false; }
1837+
}
1838+
}
18261839
}
18271840
}
18281841

trunk/src/comp/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
25042504
}
25052505
ast::expr_uniq(x) {
25062506
let t = next_ty_var(fcx);
2507-
check_expr_with(fcx, x, ty::mk_uniq(tcx, t));
2507+
check_expr_with(fcx, x, t);
25082508
write::ty_only_fixup(fcx, id, ty::mk_uniq(tcx, t));
25092509
}
25102510
_ { tcx.sess.unimpl("expr type in typeck::check_expr"); }

0 commit comments

Comments
 (0)