[PATCH] rust: sync: arc: use intra-doc links for `Arc` in doc comments
From: Vasileios Almpanis
Date: Fri Jul 03 2026 - 07:27:46 EST
Two doc comments on `Arc`'s raw-pointer methods referred to the type as
plain text rather than as an intra-doc link like the rest of the file:
- `as_ptr` said "this arc", lowercase and unlinked;
- `into_raw` said "this Arc object", capitalized but still not linked.
Rewrite both to use the `[`Arc`]` intra-doc link, matching the style used
everywhere else in the file and making the references clickable in the
generated documentation. No functional change.
Suggested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Link: https://github.com/Rust-for-Linux/linux/issues/1240
Signed-off-by: Vasileios Almpanis <vasilisalmpanis@xxxxxxxxx>
---
rust/kernel/sync/arc.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/sync/arc.rs b/rust/kernel/sync/arc.rs
index 5ac4961b7cd2..b03956ded5e5 100644
--- a/rust/kernel/sync/arc.rs
+++ b/rust/kernel/sync/arc.rs
@@ -253,7 +253,7 @@ unsafe fn from_inner(inner: NonNull<ArcInner<T>>) -> Self {
/// Convert the [`Arc`] into a raw pointer.
///
- /// The raw pointer has ownership of the refcount that this Arc object owned.
+ /// The raw pointer has ownership of the refcount that this [`Arc`] object owned.
pub fn into_raw(self) -> *const T {
let ptr = self.ptr.as_ptr();
core::mem::forget(self);
@@ -261,7 +261,7 @@ pub fn into_raw(self) -> *const T {
unsafe { core::ptr::addr_of!((*ptr).data) }
}
- /// Return a raw pointer to the data in this arc.
+ /// Return a raw pointer to the data in this [`Arc`].
pub fn as_ptr(this: &Self) -> *const T {
let ptr = this.ptr.as_ptr();
--
2.47.3