rust/tests/ui/traits/bound/recursion.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
285 B
Rust
Raw Normal View History

2024-02-07 02:42:01 +00:00
//@ check-pass
//@ pretty-expanded FIXME #23616
2013-09-02 21:19:04 +00:00
trait I { fn i(&self) -> Self; }
2015-04-18 05:12:20 +00:00
trait A<T:I> {
2013-09-02 21:19:04 +00:00
fn id(x:T) -> T { x.i() }
}
trait J<T> { fn j(&self) -> T; }
2013-09-02 21:19:04 +00:00
2015-04-18 05:12:20 +00:00
trait B<T:J<T>> {
2013-09-02 21:19:04 +00:00
fn id(x:T) -> T { x.j() }
}
2015-04-18 05:12:20 +00:00
trait C {
2013-09-02 21:19:04 +00:00
fn id<T:J<T>>(x:T) -> T { x.j() }
}
pub fn main() { }