cordyceps: implement handle-based iterator for `List`
If we want to do type-punning shenanigans with `List` like we do for `MpscQueue` in executors, we probably need traversal methods for `List` that give back a `T::Handle` instead of a `Pin<&mut T>`.
CC https://github.com/tweedegolf/cfg-noodle/issues/9#issuecomment-2894145195
This avoids issues with miri if we cast-through a node pointer, because if we do so with a `Pin<&mut T>` we have narrowed the provenance, vs the original pointer.
Open to feedback from @hawkw, otherwise I'll probably plan to implement a version of `Cursor` that yields `T::Handle`s instead. I think we can reuse the same `CoreCursor` underneath the hood, and we don't need mut and immut versions.
关闭于 2025-05-21 0 条评论