// compile-flags: -Znext-solver=coherence // check-pass // A regression test for trait-system-refactor-initiative#70. trait Trait { type Assoc; } struct W(*mut T); impl Trait for W> where W: Trait, { type Assoc = (); } trait NoOverlap {} impl> NoOverlap for T {} // `Projection( as Trait>::Assoc, u32)` should result in error even // though applying the impl results in overflow. This is necessary to match // the behavior of the old solver. impl NoOverlap for W {} fn main() {}