Skip to content

Commit 890ef11

Browse files
committed
rewrite missing-crate-dependency to rmake
1 parent d83ada3 commit 890ef11

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ run-make/macos-deployment-target/Makefile
7575
run-make/macos-fat-archive/Makefile
7676
run-make/manual-link/Makefile
7777
run-make/min-global-align/Makefile
78-
run-make/missing-crate-dependency/Makefile
7978
run-make/native-link-modifier-bundle/Makefile
8079
run-make/native-link-modifier-whole-archive/Makefile
8180
run-make/no-alloc-shim/Makefile

tests/run-make/missing-crate-dependency/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A simple smoke test to check that rustc fails compilation
2+
// and outputs a helpful message when a dependency is missing
3+
// in a dependency chain.
4+
// See https://github.com/rust-lang/rust/issues/12146
5+
6+
use run_make_support::{fs_wrapper, rust_lib_name, rustc};
7+
8+
fn main() {
9+
rustc().crate_type("rlib").input("crateA.rs").run();
10+
rustc().crate_type("rlib").input("crateB.rs").run();
11+
fs_wrapper::remove_file(rust_lib_name("crateA"));
12+
// Ensure that crateC fails to compile, as the crateA dependency is missing.
13+
rustc()
14+
.input("crateC.rs")
15+
.run_fail()
16+
.assert_stderr_contains("can't find crate for `crateA` which `crateB` depends on");
17+
}

0 commit comments

Comments
 (0)