summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/bound/recursion.rs
blob: 0023ff654e84cfe321cd73b8681ee493bcd7d0dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass
// pretty-expanded FIXME #23616

trait I { fn i(&self) -> Self; }

trait A<T:I> {
    fn id(x:T) -> T { x.i() }
}

trait J<T> { fn j(&self) -> T; }

trait B<T:J<T>> {
    fn id(x:T) -> T { x.j() }
}

trait C {
    fn id<T:J<T>>(x:T) -> T { x.j() }
}

pub fn main() { }