diff --git a/src/comp/middle/tstate/pre_post_conditions.rs b/src/comp/middle/tstate/pre_post_conditions.rs index e08c6afa338f..b769b0f36b84 100644 --- a/src/comp/middle/tstate/pre_post_conditions.rs +++ b/src/comp/middle/tstate/pre_post_conditions.rs @@ -596,6 +596,7 @@ fn find_pre_post_expr(fcx: &fn_ctxt, e: @expr) { none. { clear_pp(expr_pp(fcx.ccx, e)); } } } + expr_uniq(sub) { find_pre_post_exprs(fcx, ~[sub], e.id); } } } diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index ca9095999e76..3319d57a9446 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -704,6 +704,7 @@ fn walk_ty(cx: &ctxt, walker: ty_walk, ty: t) { } ty_var(_) {/* no-op */ } ty_param(_,_) {/* no-op */ } + ty_uniq(sub) { walk_ty(cx, walker, sub); } } walker(ty); } @@ -1232,6 +1233,7 @@ fn type_has_dynamic_size(cx: &ctxt, ty: &t) -> bool { ty_param(_,_) { ret true; } ty_type. { ret false; } ty_native(_) { ret false; } + ty_uniq(_) { ret false; } } } @@ -1583,6 +1585,11 @@ fn hash_type_structure(st: &sty) -> uint { for c: @type_constr in cs { h += h << 5u + hash_type_constr(h, c); } ret h; } + ty_uniq(t) { + let h = 37u; + h += h << 5u + hash_ty(t); + ret h; + } } } @@ -1823,6 +1830,12 @@ fn equal_type_structures(a: &sty, b: &sty) -> bool { _ { ret false; } } } + ty_uniq(t_a) { + alt b { + ty_uniq(t_b) { ret t_a == t_b; } + _ { ret false; } + } + } } } diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 03953ebb8f8c..ef289ebe5c09 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -2504,7 +2504,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr, } ast::expr_uniq(x) { let t = next_ty_var(fcx); - check_expr_with(fcx, x, ty::mk_uniq(tcx, t)); + check_expr_with(fcx, x, t); write::ty_only_fixup(fcx, id, ty::mk_uniq(tcx, t)); } _ { tcx.sess.unimpl("expr type in typeck::check_expr"); }