rewrite output-filename-conflicts-with-directory to rmake
This commit is contained in:
parent
e9ff47ff40
commit
e088edd149
@ -152,7 +152,6 @@ run-make/no-duplicate-libs/Makefile
|
||||
run-make/obey-crate-type-flag/Makefile
|
||||
run-make/optimization-remarks-dir-pgo/Makefile
|
||||
run-make/optimization-remarks-dir/Makefile
|
||||
run-make/output-filename-conflicts-with-directory/Makefile
|
||||
run-make/output-filename-overwrites-input/Makefile
|
||||
run-make/output-type-permutations/Makefile
|
||||
run-make/output-with-hyphens/Makefile
|
||||
|
@ -1,7 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
all:
|
||||
cp foo.rs $(TMPDIR)/foo.rs
|
||||
mkdir $(TMPDIR)/foo
|
||||
$(RUSTC) $(TMPDIR)/foo.rs -o $(TMPDIR)/foo 2>&1 \
|
||||
| $(CGREP) -e "the generated executable for the input file \".*foo\.rs\" conflicts with the existing directory \".*foo\""
|
@ -0,0 +1,11 @@
|
||||
// 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::{fs_wrapper, rustc};
|
||||
|
||||
fn main() {
|
||||
fs_wrapper::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""#);
|
||||
}
|
Loading…
Reference in New Issue
Block a user