mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gary Guo <gary@kernel.org>
To: "Benno Lossin" <lossin@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Gary Guo <gary@garyguo.net>
Subject: [PATCH 3/3] rust: pin-init: internal: hide `HasPinData` impl
Date: Wed, 18 Nov 2026 14:31:22 +0000	[thread overview]
Message-ID: <20261118-dev-project-vis-v1-3-2a5f433bb516@garyguo.net> (raw)
In-Reply-To: <20261118-dev-project-vis-v1-0-2a5f433bb516@garyguo.net>

From: Gary Guo <gary@garyguo.net>

`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@garyguo.net>
---
 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


      parent reply	other threads:[~2026-11-18 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 14:31 [PATCH 0/3] rust: pin-init: reduce visibility of projection methods to declutter rustdoc Gary Guo
2026-11-18 14:31 ` [PATCH 1/3] rust: pin-init: internal: allow `clippy::large_unopt_stack_frames` Gary Guo
2026-11-18 14:31 ` [PATCH 2/3] rust: pin-init: internal: use visibility of the most visible field for projection Gary Guo
2026-11-18 14:31 ` Gary Guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118-dev-project-vis-v1-3-2a5f433bb516@garyguo.net \
    --to=gary@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®