about summary refs log tree commit diff
path: root/tests/mir-opt/inline/unsized_argument.rs
blob: 281f7fe775382c3cb3c4db0f9138b9d3e06ad6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ needs-unwind
#![feature(unsized_fn_params)]

#[inline(always)]
fn callee(y: [i32]) {}

// EMIT_MIR unsized_argument.caller.Inline.diff
fn caller(x: Box<[i32]>) {
    // CHECK-LABEL: fn caller(
    // CHECK-NOT: (inlined callee)
    callee(*x);
}

fn main() {
    let b = Box::new([1]);
    caller(b);
}