[PATCH 3/3] rust: pin-init: internal: hide `HasPinData` impl
From: Gary Guo
Date: Wed Nov 18 2026 - 09:32:07 EST
From: Gary Guo <gary@xxxxxxxxxxx>
`HasPinData` is an implementation detail of pin-init to communicate from
`#[pin_data]` macro to `pin_init!()` macro on how to initialize the struct.
Thus, `HasPinData` is marked as `#[doc(hidden)]`; however, Rustdoc still
renders the impl. Thus, also mark impl as `#[doc(hidden)]`
Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
---
rust/pin-init/internal/src/pin_data.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/rust/pin-init/internal/src/pin_data.rs b/rust/pin-init/internal/src/pin_data.rs
index bcbdf33f65ae..df1de7b27e1b 100644
--- a/rust/pin-init/internal/src/pin_data.rs
+++ b/rust/pin-init/internal/src/pin_data.rs
@@ -2081,6 +2081,7 @@ impl #impl_generics __ThePinData #ty_generics
// SAFETY: We have added the correct projection functions above to `__ThePinData` and
// we also use the least restrictive generics possible.
+ #[doc(hidden)]
unsafe impl #impl_generics ::pin_init::__internal::HasPinData for #struct_name #ty_generics
#whr
{
--
2.54.0