]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68648-2.rs
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
[rust.git] / src / test / ui / generic-associated-types / issue-68648-2.rs
1 #![feature(generic_associated_types)]
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: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
14     T::identity(())
15       //~^ ERROR: mismatched types
16 }
17
18
19 fn main() {
20     let x = 10;
21
22     bug(x);
23 }