Skip to content

rustdoc: Generates wrong signature for function with associated type parameter #24417

Closed
@mbudde

Description

@mbudde

Create a library with the following src/lib.rs:

pub trait SomeTrait {
    type Typ;
}

pub struct Foo<T> {
    bar: T
}

impl<T: SomeTrait> Foo<T> {
    pub fn foo(&self, bar: T::Typ) {}
}

and run cargo doc. The documentation will show the type of Foo::foo as fn foo(&self, bar: T) and not fn foo(&self, bar: T::Typ) as expected.

rustdoc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumMedium priorityT-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