]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/default-method/bound-subst.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / traits / default-method / bound-subst.rs
1 // run-pass
2
3
4 trait A<T> {
5 fn g<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
6 }
7
8 impl A<i32> for i32 { }
9 impl<T> A<T> for u32 { }
10
11 fn f<T, U, V: A<T>>(i: V, j: T, k: U) -> (T, U) {
12 i.g(j, k)
13 }
14
15 pub fn main () {
16 assert_eq!(f(0, 1, 2), (1, 2));
17 assert_eq!(f(0, 1, 2), (1, 2));
18 }