You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traitTrait{typeAssoc;}fncall<T:Trait>(_: <TasTrait>::Assoc, _:T){}fnfoo<T:Trait>(rigid: <TasTrait>::Assoc,t:T){call::<_/* ?0 */>(rigid, t);//~^ ERROR: type mismatch resolving `<T as Trait>::Assoc normalizes-to <T as Trait>::Assoc`//// Checking the first argument of `call` will cause us to// try to coerce `<?0 as Trait>::Assoc` and `<T as Trait>::Assoc`.// The left hand side is eagerly structurally normalized to// `?1`, then we add `<?0 as Trait>::Assoc normalizes-to ?1`,// which fails.}
Given some <?0 as Trait>::Assoc, structural normalize currently checks if the predicate <?0 as Trait>::Assoc normalizes-to ?1may hold. This is ambiguous, but fails later if ?0 is constrained to some T where T: Trait, because <T as Trait>::Assoc is now rigid.