Skip to content

Commit 8b5574a

Browse files
brsongraydon
authored andcommitted
Rename check_assignment_like to check_assignment since it turned out not to be useful for send/recv
1 parent b83a4af commit 8b5574a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/comp/middle/typeck.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,9 +1644,8 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
16441644
ret tup(f_1, args_1);
16451645
}
16461646

1647-
// A generic function for checking expressions that have a form
1648-
// similar to assignment.
1649-
fn check_assignment_like(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs)
1647+
// A generic function for checking assignment expressions
1648+
fn check_assignment(&@fn_ctxt fcx, @ast.expr lhs, @ast.expr rhs)
16501649
-> tup(@ast.expr, @ast.expr, ast.ann) {
16511650
auto lhs_0 = check_expr(fcx, lhs);
16521651
auto rhs_0 = check_expr(fcx, rhs);
@@ -1814,15 +1813,15 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
18141813
}
18151814

18161815
case (ast.expr_assign(?lhs, ?rhs, _)) {
1817-
auto checked = check_assignment_like(fcx, lhs, rhs);
1816+
auto checked = check_assignment(fcx, lhs, rhs);
18181817
auto newexpr = ast.expr_assign(checked._0,
18191818
checked._1,
18201819
checked._2);
18211820
ret @fold.respan[ast.expr_](expr.span, newexpr);
18221821
}
18231822

18241823
case (ast.expr_assign_op(?op, ?lhs, ?rhs, _)) {
1825-
auto checked = check_assignment_like(fcx, lhs, rhs);
1824+
auto checked = check_assignment(fcx, lhs, rhs);
18261825
auto newexpr = ast.expr_assign_op(op,
18271826
checked._0,
18281827
checked._1,

0 commit comments

Comments
 (0)