Run filecheck on dest-prop/simple.rs

This commit is contained in:
CastilloDel 2024-04-14 11:36:24 +02:00
parent 069209034d
commit f0f867e2d3

View File

@ -1,9 +1,12 @@
// skip-filecheck
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
//@ unit-test: DestinationPropagation
// EMIT_MIR simple.nrvo.DestinationPropagation.diff
fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {
// CHECK-LABEL: fn nrvo(
// CHECK: debug init => [[init:_.*]];
// CHECK-NOT: {{_.*}} = [[init]];
// CHECK: move [[init]](move {{_.*}})
let mut buf = [0; 1024];
init(&mut buf);
buf