Skip to content

rustdoc cannot resolve specific trait impl functionsΒ #54172

Closed
@mqudsi

Description

trait Foo {
   /// This function generally does foo without side effects. 
   /// See [`SpecialFoo::foo()`] for an example.
   fn foo();
}

struct SpecialFoo {}

impl Foo for SpecialFoo {
    /// This is a good example of doing [`Foo::foo()`]
    fn foo() {}
}

There's no way to have the link SpecialFoo:foo() resolve in the rustdoc, as SpecialFoo does not contain this function. Unless there's a special syntax for referring to SpecialFoo's Foo impl that would allow this.

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

    Issue actions