Skip to contentSkip to conversation

rust: devres: fix private intra-doc link

PATCH Applied Miguel Ojeda 3 participants 4 messages Oct 29, 2025 – Nov 2, 2025

Subsystems (3)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: devres: fix private intra-doc link

The future move of pin-init to syn uncovers the following private intra-doc link:

error: public documentation for Devres links to private item Self::inner
--> rust/kernel/devres.rs:106:7
|
106 | /// [Self::inner] is guaranteed to be initialized and is always accessed read-only.
| ^^^^^^^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items = note: -D rustdoc::private-intra-doc-links implied by -D warnings
= help: to override -D warnings add #[allow(rustdoc::private_intra_doc_links)]

Currently, when rendered, the link points to "nowhere" (an inexistent anchor for a "method").

Thus fix it.

Fixes f5d3ef25d238 ("rust: devres: get rid of Devres' inner Arc")
---
 rust/kernel/devres.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/devres.rs +1 -1
index 10a6a1789854..2392c281459e 100644
@@ -103,7 +103,7 @@ struct Inner<T: Send> {
 ///
 /// # Invariants
 ///
-/// [`Self::inner`] is guaranteed to be initialized and is always accessed read-only.
+/// `Self::inner` is guaranteed to be initialized and is always accessed read-only.
 #[pin_data(PinnedDrop)]
 pub struct Devres<T: Send> {
     dev: ARef<Device>,

base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa

Signature · 1 line
2.51.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Miguel Ojeda

The future move of pin-init to syn uncovers the following private intra-doc link:

Given that, do you want to take this one through your tree? If so, please do, otherwise please let me know.

#2 lore raw
Quoted 5 lines · Danilo Krummrich

Given that, do you want to take this one through your tree? If so, please do, otherwise please let me know.

Yeah, I sent it independently in case I take it as a fix earlier; otherwise, I will put it before the syn series that will go via rust-next since it is not an urgent fix anyway.

Thanks for the quick Acked-by!

Cheers,
Miguel

Applied
#3 lore raw
In reply to Miguel Ojeda
Quoted 14 lines · Miguel Ojeda

The future move of pin-init to syn uncovers the following private intra-doc link:

error: public documentation for Devres links to private item Self::inner
--> rust/kernel/devres.rs:106:7
|
106 | /// [Self::inner] is guaranteed to be initialized and is always accessed read-only.
| ^^^^^^^^^^^ this item is private
|
= note: this link will resolve properly if you pass --document-private-items = note: -D rustdoc::private-intra-doc-links implied by -D warnings
= help: to override -D warnings add #[allow(rustdoc::private_intra_doc_links)]

Quoted 8 lines

Currently, when rendered, the link points to "nowhere" (an inexistent anchor for a "method").

Thus fix it.

Fixes f5d3ef25d238 ("rust: devres: get rid of Devres' inner Arc")

Applied to rust-fixes -- thanks!

Cheers,
Miguel