1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#[lang = "sized"] pub trait Sized {} // github issue #415 fn test<A>(a: &A) -> &A { a } fn main() { let a = 123; let b = &a; let c = test(b); // { dg-warning "unused name" "" { target *-*-* } .-1 } let a = 123f32; let b = &a; let c = test(b); // { dg-warning "unused name" "" { target *-*-* } .-1 } }