]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/bugs/issue-88526.rs
Rollup merge of #107112 - eltociear:patch-19, r=albertlarsan68
[rust.git] / tests / ui / generic-associated-types / bugs / issue-88526.rs
1 // check-fail
2 // known-bug: #88526
3
4 // This should pass, but requires more logic.
5
6 trait A {
7     type I<'a>;
8 }
9
10 pub struct TestA<F>
11 {
12     f: F,
13 }
14
15 impl<F> A for TestA<F> {
16     type I<'a> = &'a F;
17 }
18
19 struct TestB<Q, F>
20 {
21     q: Q,
22     f: F,
23 }
24
25 impl<'q, Q, I, F> A for TestB<Q, F>
26 where
27     Q: A<I<'q> = &'q I>,
28     F: Fn(I),
29 {
30     type I<'a> = ();
31 }
32
33 fn main() {}