Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH] rust: sync: arc: use intra-doc links for `Arc` in doc comments
@ 2026-07-03 11:20 Vasileios Almpanis
  2026-07-06  7:06 ` Alice Ryhl
  0 siblings, 1 reply; 2+ messages in thread
From: Vasileios Almpanis @ 2026-07-03 11:20 UTC (permalink / raw)
  To: Boqun Feng, Gary Guo, Alice Ryhl, Miguel Ojeda
  Cc: Lyude Paul, Daniel Almeida, Onur Özkan, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
	Tamir Duberstein, Alexandre Courbot, rust-for-linux, linux-kernel

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@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1240
Signed-off-by: Vasileios Almpanis <vasilisalmpanis@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rust: sync: arc: use intra-doc links for `Arc` in doc comments
  2026-07-03 11:20 [PATCH] rust: sync: arc: use intra-doc links for `Arc` in doc comments Vasileios Almpanis
@ 2026-07-06  7:06 ` Alice Ryhl
  0 siblings, 0 replies; 2+ messages in thread
From: Alice Ryhl @ 2026-07-06  7:06 UTC (permalink / raw)
  To: Vasileios Almpanis
  Cc: Boqun Feng, Gary Guo, Miguel Ojeda, Lyude Paul, Daniel Almeida,
	Onur Özkan, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Trevor Gross, Danilo Krummrich,
	Tamir Duberstein, Alexandre Courbot, rust-for-linux, linux-kernel

On Fri, Jul 03, 2026 at 01:20:40PM +0200, Vasileios Almpanis wrote:
> 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@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1240
> Signed-off-by: Vasileios Almpanis <vasilisalmpanis@gmail.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-06  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 11:20 [PATCH] rust: sync: arc: use intra-doc links for `Arc` in doc comments Vasileios Almpanis
2026-07-06  7:06 ` Alice Ryhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox