//@ compile-flags: -Znext-solver //@ ignore-compare-mode-next-solver (explicit revisions) //@ check-pass #![allow(unconditional_recursion)] // Regression test for trait-system-refactor-initiative#182. If multiple // opaque types result in different item bounds, do not apply them. trait Trait {} impl Trait for U {} fn impls_trait, U>(_: T) -> U { todo!() } fn overlap() -> (impl Trait, impl Trait) { let mut x = overlap::().0; x = overlap::().1; let u = impls_trait(x); let _: u32 = u; ((), ()) } fn main() {}