]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/bugs/issue-88526.rs
Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk
[rust.git] / src / test / ui / generic-associated-types / bugs / issue-88526.rs
1 // check-fail
2
3 // This should pass, but requires more logic.
4
5 #![feature(generic_associated_types)]
6
7 trait A {
8     type I<'a>;
9 }
10
11 pub struct TestA<F>
12 {
13     f: F,
14 }
15
16 impl<F> A for TestA<F> {
17     type I<'a> = &'a F;
18 }
19
20 struct TestB<Q, F>
21 {
22     q: Q,
23     f: F,
24 }
25
26 impl<'q, Q, I, F> A for TestB<Q, F> //~ the type parameter
27 where
28     Q: A<I<'q> = &'q I>,
29     F: Fn(I),
30 {
31     type I<'a> = ();
32 }
33
34 fn main() {}