We don't eagerly try to normalize defaulted type parameters, allowing the default to use a diverging alias.
This example was mentioned by @BoxyUwU within the context of the new solver, in rust-lang/trait-system-refactor-initiative#139 (comment), but this equally applies to both solvers. Therefore, we can track this in an issue here instead.
#![feature(rustc_attrs)]
#![rustc_no_implicit_bounds]
trait Trait {
type Diverges<D: Trait>;
}
impl<T> Trait for T {
type Diverges<D: Trait> = D::Diverges<D>;
}
struct Bar<T = <u8 as Trait>::Diverges<u8>>(*mut T);
passes in both solvers.
We don't eagerly try to normalize defaulted type parameters, allowing the default to use a diverging alias.
This example was mentioned by @BoxyUwU within the context of the new solver, in rust-lang/trait-system-refactor-initiative#139 (comment), but this equally applies to both solvers. Therefore, we can track this in an issue here instead.
passes in both solvers.