Files
rust/tests/run-make/output-filename-conflicts-with-directory/rmake.rs

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

15 lines
519 B
Rust
Raw Normal View History

// 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
2024-07-17 13:31:38 +00:00
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""#,
);
}