Skip to content

rustdoc: Some trait bounds have incorrect URLs #14137

Closed
@alxgnon

Description

@alxgnon

A couple examples in Rust's documentation:
serialize::Encodable => Click on Encoder
serialize::Decodable => Click on Decoder

This is a clear example of what kind of crate layout causes this error. Pass it through rustdoc and see for yourself:

pub use internal::{Foo, Bar};

mod internal {
    pub trait Foo {}
    pub trait Bar<T: Foo> {}
}

The Foo link in internal::Bar<T: Foo> will try to point to internal::Foo, even though the re-export moves the location of the documentation to the crate root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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