]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: pin-init: fix broken rust doc link
authorBenno Lossin <lossin@kernel.org>
Thu, 16 Oct 2025 21:17:38 +0000 (23:17 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 19 Nov 2025 21:18:33 +0000 (22:18 +0100)
Rust 1.92.0 warns when building the documentation that [`PinnedDrop`] is
an invalid reference. This is correct and it's weird that it didn't warn
before, so fix the link.

[ The reason is that it is hidden -- I had asked about that in the
  upstream PR that changed the behavior because I wasn't sure it was
  intentional (and thus whether we needed to fix this and other cases):

      https://github.com/rust-lang/rust/pull/147153#issuecomment-3395484636

  It turns out it was not, and it has been fixed for 1.92.0's upcoming
  release thanks to Guillaume and León. So we do not strictly need
  this patch and the other changes anymore:

      https://github.com/rust-lang/rust/pull/147809

  However, checking hidden/private items or, even better, a runtime
  toggle to be able to see those on the fly, is something that I think
  would be quite nice so I have had it in our usual lists for a while.
  Guillaume is open to the idea and perhaps experimenting with an
  implementation on our side first -- he asked me to open issues
  upstream:

      https://github.com/rust-lang/rust/issues/149105
      https://github.com/rust-lang/rust/issues/149106

    - Miguel ]

Signed-off-by: Benno Lossin <lossin@kernel.org>
Link: https://patch.msgid.link/20251016211740.653599-1-lossin@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/pin-init/src/macros.rs

index d6acf2cd291e036317863c1754965ec8c5cd433d..682c61a587a0c19a9dae3721c6ab635c9445c356 100644 (file)
@@ -506,6 +506,8 @@ pub use ::paste::paste;
 /// Creates a `unsafe impl<...> PinnedDrop for $type` block.
 ///
 /// See [`PinnedDrop`] for more information.
+///
+/// [`PinnedDrop`]: crate::PinnedDrop
 #[doc(hidden)]
 #[macro_export]
 macro_rules! __pinned_drop {