diff --git a/tokio/src/runtime/task/list.rs b/tokio/src/runtime/task/list.rs index ca06d459c48..159c13e16e4 100644 --- a/tokio/src/runtime/task/list.rs +++ b/tokio/src/runtime/task/list.rs @@ -240,7 +240,7 @@ impl LocalOwnedTasks { self.with_inner(|inner| // safety: We just checked that the provided task is not in some // other linked list. - unsafe { inner.list.remove(task.header().into()) }) + unsafe { inner.list.remove(task.header_ptr()) }) } /// Asserts that the given task is owned by this LocalOwnedTasks and convert