diff options
Diffstat (limited to 'tests/ui/generic-associated-types/bugs/issue-88526.rs')
-rw-r--r-- | tests/ui/generic-associated-types/bugs/issue-88526.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/bugs/issue-88526.rs b/tests/ui/generic-associated-types/bugs/issue-88526.rs new file mode 100644 index 000000000..99397744f --- /dev/null +++ b/tests/ui/generic-associated-types/bugs/issue-88526.rs @@ -0,0 +1,33 @@ +// check-fail +// known-bug: #88526 + +// This should pass, but requires more logic. + +trait A { + type I<'a>; +} + +pub struct TestA<F> +{ + f: F, +} + +impl<F> A for TestA<F> { + type I<'a> = &'a F; +} + +struct TestB<Q, F> +{ + q: Q, + f: F, +} + +impl<'q, Q, I, F> A for TestB<Q, F> +where + Q: A<I<'q> = &'q I>, + F: Fn(I), +{ + type I<'a> = (); +} + +fn main() {} |