Added file check to mir-opt/return_an_array.rs#153220
Added file check to mir-opt/return_an_array.rs#153220milosilo-dev wants to merge 4 commits intorust-lang:mainfrom
Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? mir-opt |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
This looks like an ancient test to mark destination propagation as a desired feature. We have a dedicated mir-opt test suite for this.
Do you mind?
- moving this test in
test/mir-opt/dest-propdirectory, - add the following comment at the top of the file
//@ test-mir-pass: DestinationPropagation
tests/mir-opt/return_an_array.rs
Outdated
| // File checks to confirm that the array is assigned and returned | ||
| // In the mir output |
There was a problem hiding this comment.
This is clearer than the current toplevel comment. Do you mind making this the toplevel doc-comment?
| // CHECK: let mut _0: [u8; 1024]; | ||
| // CHECK: _0 = [const 0_u8; 1024]; | ||
| // CHECK: return; |
There was a problem hiding this comment.
I usually prefer having the checks start with a // CHECK-LABEL: fn foo( and to appear inside the corresponding function.
There was a problem hiding this comment.
This has been added to the PR
I have added file checks to this file after reading #116971, I have only done one file because i want some feedback on weather I am doing it correctly or weather I am confused.
Any feedback would be greatly appreciated!