forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#125653 - GuillaumeGomez:migrate-const-prop-lint, r=jieyouxu Migrate `run-make/const-prop-lint` to `rmake.rs` Part of rust-lang#121876. r? ``@jieyouxu``
- Loading branch information
Showing
3 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Tests that const prop lints interrupting codegen don't leave `.o` files around. | ||
|
||
use std::fs; | ||
|
||
use run_make_support::{rustc, tmp_dir}; | ||
|
||
fn main() { | ||
rustc().input("input.rs").run_fail_assert_exit_code(1); | ||
|
||
for entry in fs::read_dir(tmp_dir()).unwrap() { | ||
let entry = entry.unwrap(); | ||
let path = entry.path(); | ||
|
||
if path.is_file() && path.extension().is_some_and(|ext| ext == "o") { | ||
panic!("there should not be `.o` files!"); | ||
} | ||
} | ||
} |