]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68648-2.rs
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
[rust.git] / src / test / ui / generic-associated-types / issue-68648-2.rs
1 #![feature(generic_associated_types)]
2   //~^ WARNING: the feature `generic_associated_types` is incomplete
3
4 trait Fun {
5     type F<'a>;
6
7     fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
8 }
9
10 impl <T> Fun for T {
11     type F<'a> = Self;
12 }
13
14 fn bug<'a, T: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
15     T::identity(())
16       //~^ ERROR: mismatched types
17 }
18
19
20 fn main() {
21     let x = 10;
22
23     bug(x);
24 }