2024-06-26 09:39:45 -05:00
|
|
|
// Passing --emit=dep-info to the Rust compiler should create a .d file...
|
|
|
|
// but it failed to do so in Rust 1.69.0 when combined with -Z unpretty=expanded
|
|
|
|
// due to a bug. This test checks that -Z unpretty=expanded does not prevent the
|
|
|
|
// generation of the dep-info file, and that its -Z unpretty=normal counterpart
|
|
|
|
// does not get an unexpected dep-info file.
|
|
|
|
// See https://github.com/rust-lang/rust/issues/112898
|
|
|
|
|
2024-08-28 10:01:40 -05:00
|
|
|
use run_make_support::{invalid_utf8_contains, path, rfs, rustc};
|
2024-07-28 17:13:50 -05:00
|
|
|
|
2024-06-26 09:39:45 -05:00
|
|
|
fn main() {
|
|
|
|
rustc().emit("dep-info").arg("-Zunpretty=expanded").input("with-dep.rs").run();
|
|
|
|
invalid_utf8_contains("with-dep.d", "with-dep.rs");
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::remove_file("with-dep.d");
|
2024-06-26 09:39:45 -05:00
|
|
|
rustc().emit("dep-info").arg("-Zunpretty=normal").input("with-dep.rs").run();
|
2024-08-28 10:01:40 -05:00
|
|
|
assert!(!path("with-dep.d").exists());
|
2024-06-26 09:39:45 -05:00
|
|
|
}
|