rust-lang/chalk

Opaque type doesn't find super traits impls

detrumi opened this issue · 1 comments

Opaque types currently don't find impls for super traits.
Originally found here: rust-lang/rust-analyzer#7273

This test should succeed, but currently doesn't find a solution:

program {
    trait Base {}
    trait Super where Self: Base {}
    impl Base for () {}
    impl Super for () {}

    opaque type Opaque: Super = ();
}

goal {
    Opaque: Base
} yields {
    "Unique"
}

I'm assuming we need to generate Implemented clauses for all super traits, like we do for dyn Trait types.

Fixed by #677