mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 09:50:28 +00:00
20 lines
252 B
Rust
20 lines
252 B
Rust
//@ check-pass
|
|
|
|
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() { }
|