rust/tests/run-make/const-prop-lint/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
462 B
Rust
Raw Normal View History

// Tests that const prop lints interrupting codegen don't leave `.o` files around.
2024-07-17 08:31:38 -05:00
use run_make_support::{cwd, rfs, rustc};
fn main() {
rustc().input("input.rs").run_fail().assert_exit_code(1);
for entry in rfs::read_dir(cwd()) {
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!");
}
}
}