Link to items in containing crate from a #[doc(inline)] items

I am trying to re-export a proc-macro attribute. let's call the proc-macro crate macros (not public facing), and the exporting crate public. In public, I have:

pub use macros::attribute;

And I documented the attribute in macros. In the documentation, I made references to items in public. but rustdoc can't find the link. I tried to reach it with public:: and crate::, neither works.

Is there a way to reference items in exporting crate from a #[doc(inline)]'d item?

Give the minimum reproducible code with error messages. It saves a helper's time and energy to understand what problem you're running into.

I realized I can add doc comments to the use item itself in public, since macros isn't public facing anyway, I think this is a good enough workaround.

For posterity, I found this issue that describes exactly the same problem as mine: Figure out a way to link to downstream crates · Issue #74481 · rust-lang/rust · GitHub

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.