Skip to content

False positive for use_self when using an associated type instead of the type itself. #2843

Closed
@DDOtten

Description

@DDOtten

A simple example of this is:

trait Foo {
    type Bar;
}

impl Foo for usize {
    type Bar = u8;
}

impl<T: Foo> Foo for Option<T> {
    type Bar = Option<T::Bar>;
}

here is the playground link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveL-suggestionLint: Improving, adding or fixing lint suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions