about summary refs log tree commit diff
path: root/tests/ui/generic-associated-types/issue-68648-1.rs
blob: 9e0d46f87652663adb64ba64259219100fa2a965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ check-pass

trait Fun {
    type F<'a>;

    fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
}

impl <T> Fun for T {
    type F<'a> = Self;
}

fn bug<'a, T: for<'b> Fun<F<'b> = T>>(t: T) -> T::F<'a> {
    T::identity(t)
}


fn main() {
    let x = 10;

    bug(x);
}