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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 66337d6c8ea..001fcd6198b 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -864,8 +864,12 @@ rust_task_kill_other(rust_task *task) { /* Used for linked failure */
 }
 
 extern "C" void
-rust_task_kill_all(rust_task *task) {
+rust_task_kill_all(rust_task *task) { /* Used for linked failure */
     task->fail_sched_loop();
+    // This must not happen twice.
+    static bool main_taskgroup_failed = false;
+    assert(!main_taskgroup_failed);
+    main_taskgroup_failed = true;
 }
 
 extern "C" rust_cond_lock*