Skip to content

Commit 2b70cbc

Browse files
committed
Remove some dead code from rust_shape
1 parent f0d8e97 commit 2b70cbc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/rt/rust_shape.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,9 @@ ctxt<T>::walk_res0() {
492492
reinterpret_cast<const rust_fn **>(tables->resources);
493493
const rust_fn *dtor = resources[dtor_offset];
494494

495-
// Read in the resource type parameters, but ignore them.
496-
// TODO: remove after snapshot
497-
uint16_t n_ty_params = get_u16_bump(sp);
498-
for (uint16_t i = 0; i < n_ty_params; i++) {
499-
uint16_t ty_param_len = get_u16_bump(sp);
500-
sp += ty_param_len;
501-
}
495+
// Read in a dummy value; this used to be the number of parameters
496+
uint16_t number_of_params = get_u16_bump(sp);
497+
assert(number_of_params == 0 && "resource has type parameters on it");
502498

503499
uint16_t sp_size = get_u16_bump(sp);
504500
const uint8_t *end_sp = sp + sp_size;

0 commit comments

Comments
 (0)