Remove non-working code for "running" mir-opt tests#155641
Open
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Open
Remove non-working code for "running" mir-opt tests#155641Zalathar wants to merge 2 commits intorust-lang:mainfrom
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Conversation
Tests in `tests/mir-opt` always use `--emit=mir`, so the compiler doesn't even produce an executable. Attempting to "run" these tests (e.g. with `./x test mir-opt --pass=run`) therefore fails when the OS notices that a MIR text file is not executable.
This argument is only used to inhibit `#![allow(unused)]` for `//@ run-pass` UI tests. No callers actually need to override this value, even when doing unusual things, so we can just look it up inside the method body instead.
Collaborator
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
jieyouxu
approved these changes
Apr 23, 2026
Member
There was a problem hiding this comment.
Off-topic:
Attempting to "run" these tests (e.g. with
./x test mir-opt --pass=run)
therefore fails when the OS notices that a MIR text file is not executable.
Clearly the OS is not brave enough then smh
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 23, 2026
Remove non-working code for "running" mir-opt tests Tests in `tests/mir-opt` always use `--emit=mir`, so the compiler doesn't even produce an executable. Attempting to "run" these tests (e.g. with `./x test mir-opt --pass=run`) therefore fails when the OS notices that a MIR text file is not executable. --- The second commit performs some semi-related cleanup. r? jieyouxu
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 23, 2026
Remove non-working code for "running" mir-opt tests Tests in `tests/mir-opt` always use `--emit=mir`, so the compiler doesn't even produce an executable. Attempting to "run" these tests (e.g. with `./x test mir-opt --pass=run`) therefore fails when the OS notices that a MIR text file is not executable. --- The second commit performs some semi-related cleanup. r? jieyouxu
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 23, 2026
…uwer Rollup of 10 pull requests Successful merges: - #146544 (mir-opt: Remove the workaround in UnreachableEnumBranching) - #154819 (Fix ICE for inherent associated type mismatches) - #155265 (Improved assumptions relating to isqrt) - #152576 (c-variadic: use `emit_ptr_va_arg` for mips) - #154481 (Mark a function only used in nightly as nightly only) - #155614 (c-variadic: rename `VaList::arg` to `VaList::next_arg`) - #155630 (Make `//@ skip-filecheck` a normal compiletest directive) - #155641 (Remove non-working code for "running" mir-opt tests) - #155652 (Expand `Path::is_empty` docs) - #155656 (rustc_llvm: update opt-level handling for LLVM 23)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests in
tests/mir-optalways use--emit=mir, so the compiler doesn't even produce an executable.Attempting to "run" these tests (e.g. with
./x test mir-opt --pass=run) therefore fails when the OS notices that a MIR text file is not executable.The second commit performs some semi-related cleanup.
r? jieyouxu