From 8c8d0db02deccea377e179948b8b3bfdd4b92e44 Mon Sep 17 00:00:00 2001 From: Oneirical Date: Tue, 28 May 2024 11:35:33 -0400 Subject: rewrite and rename issue-37893 to rmake --- tests/run-make/issue-37893/Makefile | 5 ----- tests/run-make/issue-37893/a.rs | 2 -- tests/run-make/issue-37893/b.rs | 2 -- tests/run-make/issue-37893/c.rs | 3 --- tests/run-make/proc-macro-init-order/a.rs | 2 ++ tests/run-make/proc-macro-init-order/b.rs | 2 ++ tests/run-make/proc-macro-init-order/c.rs | 3 +++ tests/run-make/proc-macro-init-order/rmake.rs | 15 +++++++++++++++ 8 files changed, 22 insertions(+), 12 deletions(-) delete mode 100644 tests/run-make/issue-37893/Makefile delete mode 100644 tests/run-make/issue-37893/a.rs delete mode 100644 tests/run-make/issue-37893/b.rs delete mode 100644 tests/run-make/issue-37893/c.rs create mode 100644 tests/run-make/proc-macro-init-order/a.rs create mode 100644 tests/run-make/proc-macro-init-order/b.rs create mode 100644 tests/run-make/proc-macro-init-order/c.rs create mode 100644 tests/run-make/proc-macro-init-order/rmake.rs (limited to 'tests/run-make') diff --git a/tests/run-make/issue-37893/Makefile b/tests/run-make/issue-37893/Makefile deleted file mode 100644 index 44e4a321a30..00000000000 --- a/tests/run-make/issue-37893/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: - $(RUSTC) a.rs && $(RUSTC) b.rs && $(RUSTC) c.rs diff --git a/tests/run-make/issue-37893/a.rs b/tests/run-make/issue-37893/a.rs deleted file mode 100644 index b5dffac3ff6..00000000000 --- a/tests/run-make/issue-37893/a.rs +++ /dev/null @@ -1,2 +0,0 @@ -#![allow(unused)] -#![crate_type = "proc-macro"] diff --git a/tests/run-make/issue-37893/b.rs b/tests/run-make/issue-37893/b.rs deleted file mode 100644 index 355d2b16527..00000000000 --- a/tests/run-make/issue-37893/b.rs +++ /dev/null @@ -1,2 +0,0 @@ -#![crate_type = "lib"] -#[macro_use] extern crate a; diff --git a/tests/run-make/issue-37893/c.rs b/tests/run-make/issue-37893/c.rs deleted file mode 100644 index b9c2155728c..00000000000 --- a/tests/run-make/issue-37893/c.rs +++ /dev/null @@ -1,3 +0,0 @@ -#![crate_type = "staticlib"] -extern crate b; -extern crate a; diff --git a/tests/run-make/proc-macro-init-order/a.rs b/tests/run-make/proc-macro-init-order/a.rs new file mode 100644 index 00000000000..b5dffac3ff6 --- /dev/null +++ b/tests/run-make/proc-macro-init-order/a.rs @@ -0,0 +1,2 @@ +#![allow(unused)] +#![crate_type = "proc-macro"] diff --git a/tests/run-make/proc-macro-init-order/b.rs b/tests/run-make/proc-macro-init-order/b.rs new file mode 100644 index 00000000000..355d2b16527 --- /dev/null +++ b/tests/run-make/proc-macro-init-order/b.rs @@ -0,0 +1,2 @@ +#![crate_type = "lib"] +#[macro_use] extern crate a; diff --git a/tests/run-make/proc-macro-init-order/c.rs b/tests/run-make/proc-macro-init-order/c.rs new file mode 100644 index 00000000000..b9c2155728c --- /dev/null +++ b/tests/run-make/proc-macro-init-order/c.rs @@ -0,0 +1,3 @@ +#![crate_type = "staticlib"] +extern crate b; +extern crate a; diff --git a/tests/run-make/proc-macro-init-order/rmake.rs b/tests/run-make/proc-macro-init-order/rmake.rs new file mode 100644 index 00000000000..3c3fc813381 --- /dev/null +++ b/tests/run-make/proc-macro-init-order/rmake.rs @@ -0,0 +1,15 @@ +// a.rs is a procedural macro crate, on which b.rs and c.rs depend. A now +// patched bug caused a compilation failure if the proc-macro crate was +// initialized with its dependents in this exact order. This test checks +// that compilation succeeds even when initialization is done in this order. +// See https://github.com/rust-lang/rust/issues/37893 + +//@ ignore-cross-compile + +use run_make_support::rustc; + +fn main() { + rustc().input("a.rs").run(); + rustc().input("b.rs").run(); + rustc().input("c.rs").run(); +} -- cgit 1.4.1-3-g733a5