Skip to content

Added file check to mir-opt/return_an_array.rs#153220

Open
milosilo-dev wants to merge 5 commits intorust-lang:mainfrom
milosilo-dev:main
Open

Added file check to mir-opt/return_an_array.rs#153220
milosilo-dev wants to merge 5 commits intorust-lang:mainfrom
milosilo-dev:main

Conversation

@milosilo-dev
Copy link
Copy Markdown

@milosilo-dev milosilo-dev commented Feb 28, 2026

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!

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 28, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu
  • Random selection from Mark-Simulacrum, jieyouxu

@jieyouxu
Copy link
Copy Markdown
Member

r? mir-opt

@rustbot rustbot assigned wesleywiser and unassigned jieyouxu Feb 28, 2026
@rust-log-analyzer

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@cjgillot cjgillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-prop directory,
  • add the following comment at the top of the file
//@ test-mir-pass: DestinationPropagation

View changes since this review

Comment thread tests/mir-opt/return_an_array.rs Outdated
Comment on lines +10 to +11
// File checks to confirm that the array is assigned and returned
// In the mir output
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clearer than the current toplevel comment. Do you mind making this the toplevel doc-comment?

Comment on lines +13 to +15
// CHECK: let mut _0: [u8; 1024];
// CHECK: _0 = [const 0_u8; 1024];
// CHECK: return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually prefer having the checks start with a // CHECK-LABEL: fn foo( and to appear inside the corresponding function.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been added to the PR

@cjgillot cjgillot assigned cjgillot and unassigned wesleywiser Mar 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 22, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 22, 2026

⚠️ Warning ⚠️

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust.git main
    $ git push --force-with-lease
    

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 22, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

☔ The latest upstream changes (presumably #155674) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants