rust/tests/run-make/output-filename-conflicts-with-directory/rmake.rs
许杰友 Jieyou Xu (Joe) d69cc1ccbf tests: update for rfs rename
2024-07-17 13:34:18 +00:00

15 lines
519 B
Rust

// ignore-tidy-linelength
// When the compiled executable would conflict with a directory, a
// rustc error should be displayed instead of a verbose and
// potentially-confusing linker error.
// See https://github.com/rust-lang/rust/pull/47203
use run_make_support::{rfs, rustc};
fn main() {
rfs::create_dir("foo");
rustc().input("foo.rs").output("foo").run_fail().assert_stderr_contains(
r#"the generated executable for the input file "foo.rs" conflicts with the existing directory "foo""#,
);
}