]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/issue-22110.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / issue-22110.rs
1 // run-pass
2 // Test an issue where we reported ambiguity between the where-clause
3 // and the blanket impl. The only important thing is that compilation
4 // succeeds here. Issue #22110.
5
6 // pretty-expanded FIXME #23616
7
8 #![allow(dead_code)]
9
10 trait Foo<A> {
11     fn foo(&self, a: A);
12 }
13
14 impl<A,F:Fn(A)> Foo<A> for F {
15     fn foo(&self, _: A) { }
16 }
17
18 fn baz<A,F:for<'a> Foo<(&'a A,)>>(_: F) { }
19
20 fn components<T,A>(t: fn(&A))
21     where fn(&A) : for<'a> Foo<(&'a A,)>,
22 {
23     baz(t)
24 }
25
26 fn main() {
27 }