//@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver // Regression test for trait-system-refactor-initiative#202. We have // to make sure we don't constrain ambiguous GAT args when normalizing // via where bounds or item bounds. trait Trait { type Assoc; } fn ret(x: U) -> ::Assoc { loop {} } fn where_bound = u32>>() { let inf = Default::default(); let x = ret::(inf); let _: i32 = inf; } trait ItemBound { type Bound: Trait = u32>; } fn item_bound() { let inf = Default::default(); let x = ret::(inf); let _: i32 = inf; } fn main() {}