//@ revisions: old next //@[next] compile-flags: -Znext-solver //@ check-pass // The new trait solver does not return region constraints if the goal // is still ambiguous. However, the `'!a = 'static` constraint from // `(): LeakCheckFailure<'!a, V>` is also returned via the canonical // var values, causing this test to compile. trait Ambig {} impl Ambig for u32 {} impl Ambig for u16 {} trait Id {} impl Id for u32 {} impl Id for u16 {} trait LeakCheckFailure<'a, V: ?Sized> {} impl LeakCheckFailure<'static, V> for () {} trait Trait {} impl Trait for () where for<'a> (): LeakCheckFailure<'a, V> {} impl Trait for () {} fn impls_trait, U: Id, V>() {} fn main() { impls_trait::<(), _, _>() }