aboutsummaryrefslogtreecommitdiffstats
path: root/rust/pin-init/examples/static_init.rs
diff options
context:
space:
mode:
authorAlexandre Courbot <[email protected]>2025-06-16 03:34:06 +0000
committerMiguel Ojeda <[email protected]>2025-07-03 18:46:29 +0000
commit2009a2d5696944d85c34d75e691a6f3884e787c0 (patch)
tree8892a6da03907f76be9795c8281e6b3c6c06c2a2 /rust/pin-init/examples/static_init.rs
parentrust: revocable: document why &T is not used in RevocableGuard (diff)
downloadkernel-2009a2d5696944d85c34d75e691a6f3884e787c0.tar.gz
kernel-2009a2d5696944d85c34d75e691a6f3884e787c0.zip
rust: sync: implement `Borrow` and `BorrowMut` for `Arc` types
Implement `Borrow<T>` and `BorrowMut<T>` for `UniqueArc<T>`, and `Borrow<T>` for `Arc<T>`. This allows these containers to be used in generic APIs asking for types implementing those traits. `T` and `&mut T` also implement those traits allowing users to use either owned, shared or borrowed values. `ForeignOwnable` makes a call to its own `borrow` method which must be disambiguated. Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Signed-off-by: Alexandre Courbot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/pin-init/examples/static_init.rs')
0 files changed, 0 insertions, 0 deletions