about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-08-30 13:10:10 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-08-30 13:10:10 +0200
commitadec3ecfe0424826b4a55b837dd71fbd8ef4a27c (patch)
treeb7e4651a54b4474f91eb771e15cd356f9a05c303 /src
parentc1ba28c7779a68b74b26ef70acd81d324d97e7dc (diff)
downloadrust-adec3ecfe0424826b4a55b837dd71fbd8ef4a27c.tar.gz
rust-adec3ecfe0424826b4a55b837dd71fbd8ef4a27c.zip
Remove compiler-bug-workaround that's no longer needed
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/trans.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index d3f169716d3..f7e1d4a27bc 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1663,17 +1663,6 @@ type val_fn = fn(&@block_ctxt, ValueRef) -> result;
 type val_and_ty_fn = fn(&@block_ctxt, ValueRef, ty::t) -> result;
 
 
-// Iterates through the elements of a structural type.
-fn iter_structural_ty(cx: &@block_ctxt, v: ValueRef, t: ty::t,
-                      f: val_and_ty_fn) -> result {
-    fn adaptor_fn(f: val_and_ty_fn, cx: &@block_ctxt, av: ValueRef, t: ty::t)
-       -> result {
-        ret f(cx, av, t);
-    }
-    let x = iter_structural_ty_full(cx, v, t, bind adaptor_fn(f, _, _, _));
-    ret x;
-}
-
 fn load_inbounds(cx: &@block_ctxt, p: ValueRef, idxs: &[ValueRef]) ->
    ValueRef {
     ret Load(cx, InBoundsGEP(cx, p, idxs));
@@ -1690,8 +1679,9 @@ fn incr_ptr(cx: &@block_ctxt, p: ValueRef, incr: ValueRef, pp: ValueRef) {
     Store(cx, InBoundsGEP(cx, p, [incr]), pp);
 }
 
-fn iter_structural_ty_full(cx: &@block_ctxt, av: ValueRef, t: ty::t,
-                           f: &val_and_ty_fn) -> result {
+// Iterates through the elements of a structural type.
+fn iter_structural_ty(cx: &@block_ctxt, av: ValueRef, t: ty::t,
+                      f: &val_and_ty_fn) -> result {
     fn iter_boxpp(cx: @block_ctxt, box_cell: ValueRef, f: &val_and_ty_fn) ->
        result {
         let box_ptr = Load(cx, box_cell);
@@ -1808,7 +1798,7 @@ fn iter_structural_ty_full(cx: &@block_ctxt, av: ValueRef, t: ty::t,
             GEP(cx, av, [C_int(0), C_int(abi::obj_field_box)]);
         ret iter_boxpp(cx, box_cell_a, f);
       }
-      _ { bcx_ccx(cx).sess.unimpl(~"type in iter_structural_ty_full"); }
+      _ { bcx_ccx(cx).sess.unimpl(~"type in iter_structural_ty"); }
     }
     ret r;
 }