Skip to content

Commit 7045526

Browse files
committed
Change slot_mem_ctrl to classify vec[state] as GC mem. Breaking / XFAILing mutable-vec-drop.rs test.
1 parent fb3e2fa commit 7045526

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ TEST_XFAILS_X86 := test/run-pass/mlist-cycle.rs \
321321
test/run-pass/vec-slice.rs \
322322
test/run-pass/generic-fn-infer.rs \
323323
test/run-pass/generic-recursive-tag.rs \
324+
test/run-pass/mutable-vec-drop.rs \
324325
test/run-pass/bind-obj-ctor.rs \
325326
test/run-pass/task-comm.rs \
326327
test/compile-fail/rec-missing-fields.rs \

src/boot/me/transutil.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ let slot_mem_ctrl (slot:Ast.slot) : mem_ctrl =
118118
Ast.TY_port _
119119
| Ast.TY_chan _
120120
| Ast.TY_task
121-
| Ast.TY_vec _
122121
| Ast.TY_str -> MEM_rc_opaque
122+
| Ast.TY_vec _ ->
123+
if type_has_state ty
124+
then MEM_gc
125+
else MEM_rc_opaque
123126
| _ ->
124127
match slot.Ast.slot_mode with
125128
Ast.MODE_exterior _ when type_is_structured ty ->

0 commit comments

Comments
 (0)