aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-12-11 22:39:11 -0800
committerPatrick Walton <[email protected]>2010-12-11 22:40:46 -0800
commit0d5724b7736a9a03e2bc9639569f5a3b8b1558dc (patch)
tree3392075b2a99c3471466f5af7803edc35a90d896 /src
parentrustc: Move next_var_id from typeck.crate_ctxt to typeck.fn_ctxt (diff)
downloadrust-0d5724b7736a9a03e2bc9639569f5a3b8b1558dc.tar.xz
rust-0d5724b7736a9a03e2bc9639569f5a3b8b1558dc.zip
rustc: Make return value inference use next_ty_var, now that we have it
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/typeck.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index ca8c26fe..cc2abcb0 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -1483,7 +1483,7 @@ fn check_expr(&fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
// FIXME: this breaks aliases. We need a ty_fn_arg.
append[arg](arg_tys_0, rec(mode=ast.val, ty=expr_ty(a_0)));
}
- auto rt_0 = plain_ty(ty_var(-2)); // FIXME: broken!
+ auto rt_0 = next_ty_var(fcx);
auto t_0 = plain_ty(ty_fn(arg_tys_0, rt_0));
// Unify and write back to the function.