Skip to content

Commit 8637a4e

Browse files
committed
rustc: Pull the type out of the correct expression when typechecking channel types. Puts out burning tinderbox.
1 parent 83e1dc6 commit 8637a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
25152515

25162516
case (ast::expr_chan(?x, ?a)) {
25172517
check_expr(fcx, x);
2518-
auto port_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, expr);
2518+
auto port_t = expr_ty(fcx.ccx.tcx, fcx.ccx.node_types, x);
25192519
alt (struct(fcx.ccx.tcx, port_t)) {
25202520
case (ty::ty_port(?subtype)) {
25212521
auto ct = ty::mk_chan(fcx.ccx.tcx, subtype);

0 commit comments

Comments
 (0)