Re: [PATCH v2 1/4] rust: sync: implement == operator for ARef
From: Gary Guo
Date: Fri Feb 27 2026 - 07:24:44 EST
On Fri Feb 27, 2026 at 9:34 AM GMT, Alice Ryhl wrote:
> Rust Binder wants to perform a comparison between ARef<Task> and &Task,
> so define the == operator for ARef<_> when compared with another ARef<_>
> or just a reference. The operator is implemented in terms of the same
> operator applied to the inner type.
>
> Note that PartialEq<U> cannot be implemented because it would overlap
> with the impl for ARef<U>.
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> rust/kernel/sync/aref.rs | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)