diff options
| author | Brian Anderson <[email protected]> | 2011-03-13 15:06:12 -0400 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-14 16:41:46 -0700 |
| commit | 8b5574ac0981de3f4a6f0b8acc15c07653b1b3ae (patch) | |
| tree | 73c3a191fe9898fddb0214a7e9d1319f01b144e7 /src | |
| parent | Fix the typechecking for expr_send and expr_recv (diff) | |
| download | rust-8b5574ac0981de3f4a6f0b8acc15c07653b1b3ae.tar.xz rust-8b5574ac0981de3f4a6f0b8acc15c07653b1b3ae.zip | |
Rename check_assignment_like to check_assignment since it turned out not to be useful for send/recv
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/middle/typeck.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index f76ae44d..6b826f1b 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1644,9 +1644,8 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr { ret tup(f_1, args_1); } - // A generic function for checking expressions that have a form - // similar to assignment. - fn check_assignment_like(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs) + // A generic function for checking assignment expressions + fn check_assignment(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs) -> tup(@ast.expr, @ast.expr, ast.ann) { auto lhs_0 = check_expr(fcx, lhs); auto rhs_0 = check_expr(fcx, rhs); @@ -1814,7 +1813,7 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr { } case (ast.expr_assign(?lhs, ?rhs, _)) { - auto checked = check_assignment_like(fcx, lhs, rhs); + auto checked = check_assignment(fcx, lhs, rhs); auto newexpr = ast.expr_assign(checked._0, checked._1, checked._2); @@ -1822,7 +1821,7 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr { } case (ast.expr_assign_op(?op, ?lhs, ?rhs, _)) { - auto checked = check_assignment_like(fcx, lhs, rhs); + auto checked = check_assignment(fcx, lhs, rhs); auto newexpr = ast.expr_assign_op(op, checked._0, checked._1, |