summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-68648-2.rs
blob: 6c9a0d126a78232f8cacdced7e59a2562fc5ebc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![feature(generic_associated_types)]

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: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
    T::identity(())
      //~^ ERROR: mismatched types
}


fn main() {
    let x = 10;

    bug(x);
}