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

pub fn main() {
    fn test<T>(x: T) -> T {
        x
    }

    let mut a = 123;
    a = test(a);

    let mut b = 456f32;
    b = test(b);
}