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