diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 33120cf93f9..22edea79adf 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -116,7 +116,6 @@ run-make/return-non-c-like-enum-from-c/Makefile run-make/rlib-format-packed-bundled-libs-2/Makefile run-make/rlib-format-packed-bundled-libs-3/Makefile run-make/rlib-format-packed-bundled-libs/Makefile -run-make/rustc-macro-dep-files/Makefile run-make/sanitizer-cdylib-link/Makefile run-make/sanitizer-dylib-link/Makefile run-make/sanitizer-staticlib-link/Makefile diff --git a/tests/run-make/rustc-macro-dep-files/Makefile b/tests/run-make/rustc-macro-dep-files/Makefile deleted file mode 100644 index 76d713c4bb3..00000000000 --- a/tests/run-make/rustc-macro-dep-files/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../tools.mk - -# FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC` -# instead of hardcoding them everywhere they're needed. -ifeq ($(IS_MUSL_HOST),1) -ADDITIONAL_ARGS := $(RUSTFLAGS) -endif -all: - $(BARE_RUSTC) $(ADDITIONAL_ARGS) foo.rs --out-dir $(TMPDIR) - $(RUSTC) bar.rs --target $(TARGET) --emit dep-info - $(CGREP) -v "proc-macro source" < $(TMPDIR)/bar.d diff --git a/tests/run-make/rustc-macro-dep-files/rmake.rs b/tests/run-make/rustc-macro-dep-files/rmake.rs new file mode 100644 index 00000000000..b90e719b7d6 --- /dev/null +++ b/tests/run-make/rustc-macro-dep-files/rmake.rs @@ -0,0 +1,13 @@ +// --emit dep-info used to print all macro-generated code it could +// find as if it was part of a nonexistent file named "proc-macro source", +// which is not a valid path. After this was fixed in #36776, this test checks +// that macro code is not falsely seen as coming from a different file in dep-info. +// See https://github.com/rust-lang/rust/issues/36625 + +use run_make_support::{fs_wrapper, rustc, target}; + +fn main() { + rustc().input("foo.rs").run(); + rustc().input("bar.rs").target(target()).emit("dep-info").run(); + assert!(!fs_wrapper::read_to_string("bar.d").contains("proc-macro source")); +}