Skip to content

rustdoc: Links to types in other crates broken when docs inlined via re-export from another crate #94346

Open
@jdisanti

Description

@jdisanti

Let's say you have crates A, B, and C, where:

  1. Crate A has a struct named AType.
  2. Crate B depends on crate A, and has a struct named BType that has docs that link to type AType in crate A.
  3. Crate C depends on crate B, and has a struct named CType that re-exports B::BType with #[doc(inline)].

In the docs for crate C, the link to AType in the inlined documentation for BType is broken.

For a more concrete example, the crate aws-sdk-s3 re-exports aws_smithy_http::byte_stream::Bytestream, which has a link to futures_core::Stream in its docs. This results in the inlined docs for Bytestream having a broken link to Stream, which can be observed in these docs (where it says "Via impl Stream").

Meta

Observed this with stable rustdoc 1.56.1 and rustdoc 1.61.0-nightly (4b043fa 2022-02-24).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateC-bugCategory: This is a bug.T-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

    Issue actions