rewrite and rename issue-37839 to rmake
This commit is contained in:
parent
11dd90f761
commit
8daf82fece
8 changed files with 37 additions and 10 deletions
2
tests/run-make/proc-macro-three-crates/a.rs
Normal file
2
tests/run-make/proc-macro-three-crates/a.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#![allow(unused)]
|
||||
#![crate_type = "proc-macro"]
|
3
tests/run-make/proc-macro-three-crates/b.rs
Normal file
3
tests/run-make/proc-macro-three-crates/b.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
#![crate_type = "lib"]
|
||||
#[macro_use]
|
||||
extern crate a;
|
2
tests/run-make/proc-macro-three-crates/c.rs
Normal file
2
tests/run-make/proc-macro-three-crates/c.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#![crate_type = "lib"]
|
||||
extern crate b;
|
22
tests/run-make/proc-macro-three-crates/rmake.rs
Normal file
22
tests/run-make/proc-macro-three-crates/rmake.rs
Normal file
|
@ -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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue