Skip to content

Impl displaying does not show trait generic args #21196

@ChayimFriedman2

Description

@ChayimFriedman2

E.g.:

trait Foo<T> {
    fn foo(&self) {}
}

impl<T> Foo<()> for T {
    fn foo(&self) {}
}

fn bar() {
    ().foo();
}
Image

This is confusing.

We also don't show the impl header when there are no generic parameters, which is wrong IMO but more debatable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-idegeneral IDE featuresC-bugCategory: bugE-easyE-has-instructionsIssue has some instructions and pointers to code to get started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions