about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-06-15 17:20:07 -0700
committerMichael Sullivan <sully@msully.net>2012-06-15 17:42:48 -0700
commit2b70cbc992fbeca0707a2200f730ea32af7e162e (patch)
tree1d38c951f7acb2cff89e86c185ea73ed7e3b673a
parentf0d8e978a94efe228e2ce9ca89bb4044be040c04 (diff)
downloadrust-2b70cbc992fbeca0707a2200f730ea32af7e162e.tar.gz
rust-2b70cbc992fbeca0707a2200f730ea32af7e162e.zip
Remove some dead code from rust_shape
-rw-r--r--src/rt/rust_shape.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h
index 0de19321050..af447498185 100644
--- a/src/rt/rust_shape.h
+++ b/src/rt/rust_shape.h
@@ -492,13 +492,9 @@ ctxt<T>::walk_res0() {
         reinterpret_cast<const rust_fn **>(tables->resources);
     const rust_fn *dtor = resources[dtor_offset];
 
-    // Read in the resource type parameters, but ignore them.
-    // TODO: remove after snapshot
-    uint16_t n_ty_params = get_u16_bump(sp);
-    for (uint16_t i = 0; i < n_ty_params; i++) {
-        uint16_t ty_param_len = get_u16_bump(sp);
-        sp += ty_param_len;
-    }
+    // Read in a dummy value; this used to be the number of parameters
+    uint16_t number_of_params = get_u16_bump(sp);
+    assert(number_of_params == 0 && "resource has type parameters on it");
 
     uint16_t sp_size = get_u16_bump(sp);
     const uint8_t *end_sp = sp + sp_size;