From 2b8b82feec6a03a4730e235ac27e7744617a5073 Mon Sep 17 00:00:00 2001 From: milosilo-dev Date: Sat, 28 Feb 2026 13:38:29 +0000 Subject: [PATCH 1/4] Addded file check to return_an_array.rs --- tests/mir-opt/return_an_array.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs index 673b5df7d7303..4bd98761eae1e 100644 --- a/tests/mir-opt/return_an_array.rs +++ b/tests/mir-opt/return_an_array.rs @@ -1,5 +1,3 @@ -// skip-filecheck -// this tests move up progration, which is not yet implemented fn foo() -> [u8; 1024] { let x = [0; 1024]; @@ -7,3 +5,10 @@ fn foo() -> [u8; 1024] { } fn main() {} + +// File checks to confirm that the array is assigned and returned +// In the mir output + +// CHECK: let mut _0: [u8; 1024]; +// CHECK: _0 = [const 0_u8; 1024]; +// CHECK: return; From a817a175a584e3af5b970d6aca6c25d50045b0eb Mon Sep 17 00:00:00 2001 From: milosilo-dev Date: Sat, 28 Feb 2026 13:42:21 +0000 Subject: [PATCH 2/4] readded the test message --- tests/mir-opt/return_an_array.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs index 4bd98761eae1e..91effaeafc268 100644 --- a/tests/mir-opt/return_an_array.rs +++ b/tests/mir-opt/return_an_array.rs @@ -1,3 +1,4 @@ +// this tests move up progration, which is not yet implemented fn foo() -> [u8; 1024] { let x = [0; 1024]; From 153eb3f46000556839333e2c2945d1e859a5df31 Mon Sep 17 00:00:00 2001 From: milosilo-dev Date: Sat, 28 Feb 2026 13:52:41 +0000 Subject: [PATCH 3/4] fixed tidy issues --- tests/mir-opt/return_an_array.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs index 91effaeafc268..654b4cb9201c7 100644 --- a/tests/mir-opt/return_an_array.rs +++ b/tests/mir-opt/return_an_array.rs @@ -10,6 +10,6 @@ fn main() {} // File checks to confirm that the array is assigned and returned // In the mir output -// CHECK: let mut _0: [u8; 1024]; +// CHECK: let mut _0: [u8; 1024]; // CHECK: _0 = [const 0_u8; 1024]; // CHECK: return; From 47eb1b68e67511c48373f6f9bb42af57c87ad979 Mon Sep 17 00:00:00 2001 From: milosilo-dev Date: Mon, 2 Mar 2026 06:53:43 +0000 Subject: [PATCH 4/4] Fixed Test formating and moved file to dest-prop --- tests/mir-opt/{ => dest-prop}/return_an_array.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename tests/mir-opt/{ => dest-prop}/return_an_array.rs (79%) diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/dest-prop/return_an_array.rs similarity index 79% rename from tests/mir-opt/return_an_array.rs rename to tests/mir-opt/dest-prop/return_an_array.rs index 654b4cb9201c7..7299121563a3d 100644 --- a/tests/mir-opt/return_an_array.rs +++ b/tests/mir-opt/dest-prop/return_an_array.rs @@ -1,15 +1,16 @@ -// this tests move up progration, which is not yet implemented +//@ 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; } -fn main() {} - -// File checks to confirm that the array is assigned and returned -// In the mir output - +// CHECK-LABEL: fn foo( // CHECK: let mut _0: [u8; 1024]; // CHECK: _0 = [const 0_u8; 1024]; // CHECK: return; + +fn main() {}