Skip to content

Associated types of supertraits aren't accepted or completed in impl Subtrait<...> #12166

Closed
@jonas-schievink

Description

@jonas-schievink
trait Super {
    type AssocSuper;
}

trait Sub: Super {
    type AssocSub;
}

fn f() -> impl Sub<AssocSuper = ()> {}

Here in the impl Sub<...> the AssocSuper remains an unresolved reference, but rustc has no problem with this code. AssocSuper is also not completed, while AssocSub is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionautocompletionA-idegeneral IDE featuresA-nameresname, path and module resolutionA-tytype system / type inference / traits / method resolutionC-bugCategory: bugS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions