Open momvart opened 1 year ago
@rustbot label -I-ICE
When built with rustc +nightly -Ztrait-solver=next
, the error becomes
error[E0271]: type mismatch resolving `<T as Foo>::A<'a> == <T as Alias>::AliasA<'a>`
--> main.rs:17:23
|
17 | type AliasA<'a> = <T as Foo>::A<'a>;
| ^^^^^^^^^^^^^^^^^ types differ
|
note: required by a bound in `Alias`
--> main.rs:7:23
|
5 | trait Alias
| ----- required by a bound in this trait
6 | where
7 | for<'a> Self: Foo<A<'a> = <Self as Alias>::AliasA<'a>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Alias`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0271`.
While #39959 and #111313 are discussing the same issue, in this case, it looks like there's a problem with GATs (generic associated types) or probably HRTBs (higher-rank trait bounds). Try removing the generic lifetime
'a
and the problem will be solved.Code
Meta
rustc --version --verbose
:Error output