I'm trying to use GATs for a small personal project (I know that I probably shouldn't). So far it worked, but now I'm having an error, which I don't understand. Here is an example.
Here is the error:
error[E0271]: type mismatch resolving `for<'a> <<FooImpl as Foo>::Bar<'a> as Bar>::Baz == <FooImpl as Foo>::Baz<'a>` --> src/main.rs:42:20 | 42 | type Baz<'a> = MyBaz<'a>; | ^^^^^^^^^ expected struct `MyBaz`, found associated type | = note: expected struct `MyBaz<'_>` found associated type `<FooImpl as Foo>::Baz<'_>` = help: consider constraining the associated type `<FooImpl as Foo>::Baz<'_>` to `MyBaz<'_>` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
What am I doing wrong?