]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-68648-1.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / issue-68648-1.rs
1 // check-pass
2
3 trait Fun {
4     type F<'a>;
5
6     fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
7 }
8
9 impl <T> Fun for T {
10     type F<'a> = Self;
11 }
12
13 fn bug<'a, T: for<'b> Fun<F<'b> = T>>(t: T) -> T::F<'a> {
14     T::identity(t)
15 }
16
17
18 fn main() {
19     let x = 10;
20
21     bug(x);
22 }