about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 7b00c6e701c..4f512390210 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -157,14 +157,15 @@ str_reserve_shared(rust_vec_box** sp,
  * Copies elements in an unsafe buffer to the given interior vector. The
  * vector must have size zero.
  */
-extern "C" CDECL rust_vec*
+extern "C" CDECL rust_vec_box*
 vec_from_buf_shared(type_desc *ty, void *ptr, size_t count) {
     rust_task *task = rust_get_current_task();
     size_t fill = ty->size * count;
-    rust_vec* v = (rust_vec*)task->kernel->malloc(fill + sizeof(rust_vec),
-                                                    "vec_from_buf");
-    v->fill = v->alloc = fill;
-    memmove(&v->data[0], ptr, fill);
+    rust_vec_box* v = (rust_vec_box*)
+        task->kernel->malloc(fill + sizeof(rust_vec_box),
+                             "vec_from_buf");
+    v->body.fill = v->body.alloc = fill;
+    memmove(&v->body.data[0], ptr, fill);
     return v;
 }