about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2011-08-12 15:01:13 -0700
committerMichael Sullivan <sully@msully.net>2011-08-12 15:16:01 -0700
commit2421312deab6311dc9b4cd8b610f799c07f50071 (patch)
tree89a0330ed69340772c44c620b19e11aa4955ae30 /src
parent4e62c0d6cb75c514d1cd35e1f79c0bd6076948a9 (diff)
Don't rely on binop autoderef in the compiler.
Diffstat (limited to 'src')
-rw-r--r--src/comp/front/test.rs2
-rw-r--r--src/comp/middle/typeck.rs2
-rw-r--r--src/test/stdtest/test.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs
index 8604b648808..2616c320804 100644
--- a/src/comp/front/test.rs
+++ b/src/comp/front/test.rs
@@ -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);
 
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 4b91c353e71..7bbd8a800d6 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -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;
 }
 
diff --git a/src/test/stdtest/test.rs b/src/test/stdtest/test.rs
index fd6f8831bf9..6526ee6531b 100644
--- a/src/test/stdtest/test.rs
+++ b/src/test/stdtest/test.rs
@@ -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]