about summary refs log tree commit diff
path: root/src/rt/test/rust_test_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/test/rust_test_runtime.cpp')
-rw-r--r--src/rt/test/rust_test_runtime.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/test/rust_test_runtime.cpp b/src/rt/test/rust_test_runtime.cpp
index ad5a018eec8..520426eb256 100644
--- a/src/rt/test/rust_test_runtime.cpp
+++ b/src/rt/test/rust_test_runtime.cpp
@@ -45,7 +45,8 @@ void task_entry() {
 
 void
 rust_task_test::worker::run() {
-    rust_task *root_task = kernel->create_task(NULL, "main");
+    rust_task_id root_id = kernel->create_task(NULL, "main");
+    rust_task *root_task = kernel->get_task_by_id(root_id);
     root_task->start((uintptr_t)&task_entry, (uintptr_t)NULL);
     root_task->sched->start_main_loop();
 }