aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/torture/generics21.rs
blob: 1c74ea429991157e6248379a0d7ba22c979e8c78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[lang = "sized"]
pub trait Sized {}

fn callee<T>(t: &T) -> i32 {
    // { dg-warning "unused name" "" { target *-*-* } .-1 }
    32
}

fn caller(t: i32) -> i32 {
    callee(&t)
}

fn main() {
    let a;
    a = caller(123);
}