Rollup merge of #125653 - GuillaumeGomez:migrate-const-prop-lint, r=jieyouxu
Migrate `run-make/const-prop-lint` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ``@jieyouxu``
This commit is contained in:
commit
3b6a3eb3cc
3 changed files with 18 additions and 10 deletions
|
@ -21,7 +21,6 @@ run-make/compiler-lookup-paths-2/Makefile
|
|||
run-make/compiler-lookup-paths/Makefile
|
||||
run-make/compiler-rt-works-on-mingw/Makefile
|
||||
run-make/compressed-debuginfo/Makefile
|
||||
run-make/const-prop-lint/Makefile
|
||||
run-make/const_fn_mir/Makefile
|
||||
run-make/crate-data-smoke/Makefile
|
||||
run-make/crate-hash-rustc-version/Makefile
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
include ../tools.mk
|
||||
|
||||
# Test that emitting an error because of arithmetic
|
||||
# overflow lint does not leave .o files around
|
||||
# because of interrupted codegen.
|
||||
|
||||
all:
|
||||
$(RUSTC) input.rs; test $$? -eq 1
|
||||
ls *.o; test $$? -ne 0
|
18
tests/run-make/const-prop-lint/rmake.rs
Normal file
18
tests/run-make/const-prop-lint/rmake.rs
Normal file
|
@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue