]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/bugs/issue-88526.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / 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 #![feature(generic_associated_types)]
7
8 trait A {
9     type I<'a>;
10 }
11
12 pub struct TestA<F>
13 {
14     f: F,
15 }
16
17 impl<F> A for TestA<F> {
18     type I<'a> = &'a F;
19 }
20
21 struct TestB<Q, F>
22 {
23     q: Q,
24     f: F,
25 }
26
27 impl<'q, Q, I, F> A for TestB<Q, F>
28 where
29     Q: A<I<'q> = &'q I>,
30     F: Fn(I),
31 {
32     type I<'a> = ();
33 }
34
35 fn main() {}