[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DABBYG8W5F5U.1MXKCC6LSHBPV@kernel.org>
Date: Sun, 01 Jun 2025 18:17:05 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Alexandre Courbot" <acourbot@...dia.com>, "Danilo Krummrich"
<dakr@...nel.org>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor"
<alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Andreas Hindborg" <a.hindborg@...nel.org>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] rust: alloc: implement `Borrow` and `BorrowMut` for
`Arc` types
On Sun Jun 1, 2025 at 5:00 AM CEST, Alexandre Courbot wrote:
> Implement these two common traits, which allow generic types to store
> either an owned value or a reference to it, leveraging the `Deref`
> implementation.
Same here.
---
Cheers,
Benno
>
> `Arc` can only implement `Borrow`, but `UniqueArc` is able to support
> both.
>
> `ForeignOwnable` makes a call to its own `borrow` method which must be
> disambiguated.
>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> ---
> rust/kernel/sync/arc.rs | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
Powered by blists - more mailing lists