about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/ambiguous-impl-in-resolve.rs
blob: 78dffcbf6abc3ac84ff5fc7be9ae3eb6c39e96f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass
//@ compile-flags: -Znext-solver

trait Local {}

trait Overlap { fn f(); }
impl<T> Overlap for Option<T> where Self: Clone, { fn f() {} }
impl<T> Overlap for Option<T> where Self: Local, { fn f() {} }

fn test<T>()
where
    Option<T>: Clone + Local,
{
    <Option<T> as Overlap>::f();
}

fn main() {}