Don't rely on binop autoderef in the compiler.

This commit is contained in:
Michael Sullivan 2011-08-12 15:01:13 -07:00
parent 4e62c0d6cb
commit 2421312dea
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ fn modify_for_testing(crate: @ast::crate) -> @ast::crate {
let next_node_id_fn =
@bind fn (next_node_id: @mutable ast::node_id) -> ast::node_id {
let this_node_id = *next_node_id;
*next_node_id = next_node_id + 1;
*next_node_id += 1;
ret this_node_id;
}(next_node_id);

View File

@ -2472,7 +2472,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
fn next_ty_var_id(fcx: @fn_ctxt) -> int {
let id = *fcx.next_var_id;
*fcx.next_var_id = fcx.next_var_id + 1;
*fcx.next_var_id += 1;
ret id;
}

View File

@ -13,7 +13,7 @@ fn do_not_run_ignored_tests() {
test::run_test(desc, test::default_test_to_task);
assert (ran == false);
assert (*ran == false);
}
#[test]