about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_internal.h2
-rw-r--r--src/rt/rust_upcall.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h
index f10e55d40a0..d5c4f459f1c 100644
--- a/src/rt/rust_internal.h
+++ b/src/rt/rust_internal.h
@@ -212,7 +212,7 @@ struct type_desc {
     const type_desc **first_param;
     size_t size;
     size_t align;
-    glue_fn *take_glue;
+    glue_fn *copy_glue;
     glue_fn *drop_glue;
     glue_fn *free_glue;
     glue_fn *sever_glue;    // For GC.
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index f6257470b29..7b1ddc4c3a4 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -453,13 +453,14 @@ copy_elements(rust_task *task, type_desc *elem_t,
 {
     char *dst = (char *)pdst, *src = (char *)psrc;
 
+    // FIXME: Copy glue doesn't work this way.
     // increment the refcount of each element of the vector
-    if (elem_t->take_glue) {
-        glue_fn *take_glue = elem_t->take_glue;
+    if (elem_t->copy_glue) {
+        glue_fn *copy_glue = elem_t->copy_glue;
         size_t elem_size = elem_t->size;
         const type_desc **tydescs = elem_t->first_param;
         for (char *p = src; p < src+n; p += elem_size) {
-            take_glue(NULL, task, NULL, tydescs, p);
+            copy_glue(NULL, task, NULL, tydescs, p);
         }
     }
     memmove(dst, src, n);