Closed
Description
Example:
#![feature(trait_alias)]
#![feature(existential_type)]
trait Foo {
type Bar: Baz<Self, Self>;
fn bar(&self) -> Self::Bar;
}
struct X;
impl Foo for X {
existential type Bar: Baz<Self, Self>;
fn bar(&self) -> Self::Bar {
|x: &X| x
}
}
trait Baz<A, B> = Fn(&A) -> &B;
Workaround: Replace existential type Bar: Baz<Self, Self>;
with existential type Bar: Fn(&X) -> &X;
Possibly related to #57611
Playground