about summary refs log tree commit diff
path: root/tests/run-make/const-prop-lint/rmake.rs
blob: 17e4b0c77f35b71428bcec2ce64776954a37722c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Tests that const prop lints interrupting codegen don't leave `.o` files around.

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!");
        }
    }
}