Re: [PATCH v2] rust: list: Add an example for `ListLinksSelfPtr` usage
From: Alice Ryhl
Date: Thu Jul 24 2025 - 15:44:02 EST
On Thu, Jul 24, 2025 at 7:20 PM Boqun Feng <boqun.feng@xxxxxxxxx> wrote:
>
> It appears that the support for `ListLinksSelfPtr` is dead code at the
> moment [1]. Altough some tests were added at [2] for impl `ListItem`
> using `ListLinksSelfPtr` field, still we could use more examples
> demonstrating and testing the usage of `ListLinksSelfPtr`. Hence add an
> example similar to `ListLinks` usage.
>
> The example is mostly based on Alice's usage in binder driver [3].
>
> Link: https://lore.kernel.org/rust-for-linux/20250719183649.596051-1-ojeda@xxxxxxxxxx/ [1]
> Link: https://lore.kernel.org/rust-for-linux/20250709-list-no-offset-v4-5-a429e75840a9@xxxxxxxxx/ [2]
> Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-4-08ba9197f637@xxxxxxxxxx/ [3]
> Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>