Debian Codegraph @

gcc/testsuite/rust/compile/torture/generics26.rs

raw
1 #[lang = "sized"]
2 pub trait Sized {}
3
4 // github issue #415
5 fn test<A, B>(a: A, b: B) -> (A, B) {
6 (a, b)
7 }
8
9 fn main() {
10 let a = test::<i32, i32>(123, 456);
11 // { dg-warning "unused name" "" { target *-*-* } .-1 }
12
13 let b = test::<f32, f32>(123f32, 456f32);
14 // { dg-warning "unused name" "" { target *-*-* } .-1 }
15
16 let c = test::<_, _>(123, 456f32);
17 // { dg-warning "unused name" "" { target *-*-* } .-1 }
18
19 let d = test(true, 1234);
20 // { dg-warning "unused name" "" { target *-*-* } .-1 }
21
22 let e = test((123, false), 123f32);
23 // { dg-warning "unused name" "" { target *-*-* } .-1 }
24 }