From 8ee12d337fbc1662350815dbde620f2f1b23f962 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 11 Aug 2025 16:08:15 -0400 Subject: [PATCH] doc: fix rustdoc link in macro `$wrapper` is not visible to rustdoc before expansion. Build the link after expansion. --- aya/src/programs/links.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs index 40d4c12d..6edbdb82 100644 --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -546,7 +546,9 @@ macro_rules! define_link_wrapper { /// Takes ownership of the link referenced by the provided `link_id`. /// /// The caller takes the responsibility of managing the lifetime of the link. When the - /// returned [`$wrapper`] is dropped, the link is detached. + /// returned + #[doc = concat!("[`", stringify!($wrapper), "`]")] + /// is dropped, the link will be detached. pub fn take_link(&mut self, link_id: $wrapper_id) -> Result<$wrapper, ProgramError> { self.data.links.forget(link_id) }