Skip to content

Links in an exported proc-macro seem to always be broken without cargo doc warning about it? #138575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AaronKutch opened this issue Mar 15, 2025 · 1 comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@AaronKutch
Copy link
Contributor

Take for example from https://docs.rs/awint/0.18.0/awint/index.html:

/// A concatenations of components macro, additionally using the source value to
/// construct an [InlAwi](awint_macro_internals::awint_core::InlAwi). See the
/// [crate documentation](crate) for more.
#[proc_macro]
pub fn inlawi(input: TokenStream) -> TokenStream {

The line [InlAwi](awint_macro_internals::awint_core::InlAwi) simply routes through a dependency of the proc-macro crate that is also plainly available to the awint crate it is reexported in. However, it is just broken. The line [crate documentation](crate) refers to the macro crate this macro is in, so that clicking on it goes to to proc-macros lib docs.

Apparently the [InlAwi](awint_macro_internals::awint_core::InlAwi) one has always been broken with "The requested resource does not exist", and the [crate documentation](crate) kind worked until sometime in the past few months without me noticing or cargo doc warning about it. I have published a workaround but it would be nice to fix this.

@GuillaumeGomez GuillaumeGomez transferred this issue from rust-lang/docs.rs Mar 16, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 16, 2025
@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 16, 2025
@bjorn3
Copy link
Member

bjorn3 commented Mar 17, 2025

We intentionally skip processing links in proc macros to their dependencies to avoid an ICE: #133105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants