about summary refs log tree commit diff
path: root/tests/run-make/no-intermediate-extras/rmake.rs
blob: 0b12da6a01deb4439d7f7959acfe29b98b7412fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// When using the --test flag with an rlib, this used to generate
// an unwanted .bc file, which should not exist. This test checks
// that the bug causing the generation of this file has not returned.
// See https://github.com/rust-lang/rust/issues/10973

//@ ignore-cross-compile

use std::fs;

use run_make_support::rustc;

fn main() {
    rustc().crate_type("rlib").arg("--test").input("foo.rs").run();
    assert!(
        fs::remove_file("foo.bc").is_err(),
        "An unwanted .bc file was created by run-make/no-intermediate-extras."
    );
}