Skip to content

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

Open
@AaronKutch

Description

@AaronKutch
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.

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Mar 16, 2025
added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by name
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Mar 16, 2025
bjorn3

bjorn3 commented on Mar 17, 2025

@bjorn3
Member

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @GuillaumeGomez@bjorn3@AaronKutch@rustbot

        Issue actions

          Links in an exported proc-macro seem to always be broken without `cargo doc` warning about it? · Issue #138575 · rust-lang/rust