rust/tests/run-make/no-intermediate-extras/rmake.rs

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

19 lines
552 B
Rust
Raw Permalink Normal View History

2024-05-17 12:29:43 -05:00
// 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
2024-05-17 13:55:14 -05:00
use std::fs;
2024-05-17 12:29:43 -05:00
use run_make_support::rustc;
2024-05-17 12:29:43 -05:00
fn main() {
2024-05-17 13:06:38 -05:00
rustc().crate_type("rlib").arg("--test").input("foo.rs").run();
2024-05-20 20:30:48 -05:00
assert!(
fs::remove_file("foo.bc").is_err(),
2024-05-20 20:30:48 -05:00
"An unwanted .bc file was created by run-make/no-intermediate-extras."
);
2024-05-17 12:29:43 -05:00
}