rust/tests/mir-opt/inline/unsized_argument.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
240 B
Rust
Raw Normal View History

// needs-unwind
#![feature(unsized_fn_params)]
#[inline(always)]
fn callee(y: [i32]) {}
// EMIT_MIR unsized_argument.caller.Inline.diff
fn caller(x: Box<[i32]>) {
callee(*x);
}
fn main() {
let b = Box::new([1]);
caller(b);
}