[PATCH v2 0/2] Remove `ArcBorrow`

From: Wedson Almeida Filho
Date: Sat Sep 23 2023 - 10:49:53 EST


From: Wedson Almeida Filho <walmeida@xxxxxxxxxxxxx>

In this small series we remove `ArcBorrow<'_, T>` and replace it with
`&WithRef<T>`, which we used to call `ArcInner` -- it is renamed
because it is now public, so we chose a more meaningful name.

This simplifies the code because we remove a type and have simpler
syntax to refer to borrowed arcs: `ArcBorrow<'a, T>` vs
`&'a WithRef<T>`.

This became possible when we adopted GATs in 2021 but we only realised
it recently (thanks Boqun!), more details on this zulip thread:
https://rust-for-linux.zulipchat.com/#narrow/stream/291566-Library/topic/Isn't.20.60ArcBorrow.60.20just.20.60.26ArcInner.3CT.3E.60.3F

Changes v1 -> v2:
* Moved the definition of `WithRef` to where `ArcBorrow` was.
* Updated documentation of `as_arc_borrow`.

Wedson Almeida Filho (2):
rust: arc: rename `ArcInner` to `WithRef`
rust: arc: remove `ArcBorrow` in favour of `WithRef`

rust/kernel/sync.rs | 2 +-
rust/kernel/sync/arc.rs | 146 +++++++++--------------------
rust/kernel/sync/arc/std_vendor.rs | 4 +-
3 files changed, 47 insertions(+), 105 deletions(-)


base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
--
2.34.1