diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run-make/issue-37839/Makefile | 7 | ||||
| -rw-r--r-- | tests/run-make/proc-macro-three-crates/a.rs (renamed from tests/run-make/issue-37839/a.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/proc-macro-three-crates/b.rs (renamed from tests/run-make/issue-37839/b.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/proc-macro-three-crates/c.rs (renamed from tests/run-make/issue-37839/c.rs) | 0 | ||||
| -rw-r--r-- | tests/run-make/proc-macro-three-crates/rmake.rs | 22 |
5 files changed, 22 insertions, 7 deletions
diff --git a/tests/run-make/issue-37839/Makefile b/tests/run-make/issue-37839/Makefile deleted file mode 100644 index 6bad27b7bdc..00000000000 --- a/tests/run-make/issue-37839/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: - $(RUSTC) a.rs && $(RUSTC) b.rs - $(BARE_RUSTC) c.rs -L dependency=$(TMPDIR) --extern b=$(TMPDIR)/libb.rlib \ - --out-dir=$(TMPDIR) diff --git a/tests/run-make/issue-37839/a.rs b/tests/run-make/proc-macro-three-crates/a.rs index b5dffac3ff6..b5dffac3ff6 100644 --- a/tests/run-make/issue-37839/a.rs +++ b/tests/run-make/proc-macro-three-crates/a.rs diff --git a/tests/run-make/issue-37839/b.rs b/tests/run-make/proc-macro-three-crates/b.rs index 067f47c1b7a..067f47c1b7a 100644 --- a/tests/run-make/issue-37839/b.rs +++ b/tests/run-make/proc-macro-three-crates/b.rs diff --git a/tests/run-make/issue-37839/c.rs b/tests/run-make/proc-macro-three-crates/c.rs index 4c7ce01b6a0..4c7ce01b6a0 100644 --- a/tests/run-make/issue-37839/c.rs +++ b/tests/run-make/proc-macro-three-crates/c.rs diff --git a/tests/run-make/proc-macro-three-crates/rmake.rs b/tests/run-make/proc-macro-three-crates/rmake.rs new file mode 100644 index 00000000000..62dc547fcfb --- /dev/null +++ b/tests/run-make/proc-macro-three-crates/rmake.rs @@ -0,0 +1,22 @@ +// A compiler bug caused the following issue: +// If a crate A depends on crate B, and crate B +// depends on crate C, and crate C contains a procedural +// macro, compiling crate A would fail. +// This was fixed in #37846, and this test checks +// that this bug does not make a resurgence. + +//FIXME(Oneirical): ignore-cross-compile + +use run_make_support::{bare_rustc, cwd, rust_lib_name, rustc}; + +fn main() { + rustc().input("a.rs").run(); + rustc().input("b.rs").run(); + let curr_dir = cwd().display().to_string(); + bare_rustc() + .input("c.rs") + .arg(format!("-Ldependency={curr_dir}")) + .extern_("b", cwd().join(rust_lib_name("b"))) + .out_dir(cwd()) + .run(); +} |
