diff --git a/tests/mir-opt/dest-prop/return_an_array.rs b/tests/mir-opt/dest-prop/return_an_array.rs new file mode 100644 index 0000000000000..7299121563a3d --- /dev/null +++ b/tests/mir-opt/dest-prop/return_an_array.rs @@ -0,0 +1,16 @@ +//@ test-mir-pass: DestinationPropagation + +// File checks to confirm that the array is assigned and returned +// In the mir output + +fn foo() -> [u8; 1024] { + let x = [0; 1024]; + return x; +} + +// CHECK-LABEL: fn foo( +// CHECK: let mut _0: [u8; 1024]; +// CHECK: _0 = [const 0_u8; 1024]; +// CHECK: return; + +fn main() {} diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs deleted file mode 100644 index 673b5df7d7303..0000000000000 --- a/tests/mir-opt/return_an_array.rs +++ /dev/null @@ -1,9 +0,0 @@ -// skip-filecheck -// this tests move up progration, which is not yet implemented - -fn foo() -> [u8; 1024] { - let x = [0; 1024]; - return x; -} - -fn main() {}