2024-05-28 06:39:21 -05:00
|
|
|
// 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};
|
2024-05-28 06:39:21 -05:00
|
|
|
|
|
|
|
fn main() {
|
2024-06-07 08:23:10 -05:00
|
|
|
rustc().input("input.rs").run_fail().assert_exit_code(1);
|
2024-05-28 06:39:21 -05:00
|
|
|
|
2024-07-17 07:42:06 -05:00
|
|
|
for entry in rfs::read_dir(cwd()) {
|
2024-05-28 06:39:21 -05:00
|
|
|
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!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|