]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-68648-2.rs
internally change regions to be covariant
[rust.git] / tests / ui / generic-associated-types / issue-68648-2.rs
1 trait Fun {
2     type F<'a>;
3
4     fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
5 }
6
7 impl <T> Fun for T {
8     type F<'a> = Self;
9 }
10
11 fn bug<'a, T: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
12     T::identity(())
13       //~^ ERROR: mismatched types
14 }
15
16
17 fn main() {
18     let x = 10;
19
20     bug(x);
21 }