Skip to content

Commit cabc982

Browse files
committed
rewrite invalid-staticlib to rmake
1 parent ff82e43 commit cabc982

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ run-make/interdependent-c-libraries/Makefile
7575
run-make/intrinsic-unreachable/Makefile
7676
run-make/invalid-library/Makefile
7777
run-make/invalid-so/Makefile
78-
run-make/invalid-staticlib/Makefile
7978
run-make/issue-107094/Makefile
8079
run-make/issue-10971-temps-dir/Makefile
8180
run-make/issue-109934-lto-debuginfo/Makefile
@@ -96,7 +95,6 @@ run-make/issue-40535/Makefile
9695
run-make/issue-47384/Makefile
9796
run-make/issue-47551/Makefile
9897
run-make/issue-51671/Makefile
99-
run-make/issue-64153/Makefile
10098
run-make/issue-68794-textrel-on-minimal-lib/Makefile
10199
run-make/issue-69368/Makefile
102100
run-make/issue-83045/Makefile

tests/run-make/invalid-staticlib/Makefile

-5
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// If the static library provided is not valid (in this test,
2+
// created as an empty file),
3+
// rustc should print a normal error message and not throw
4+
// an internal compiler error (ICE).
5+
// See https://github.com/rust-lang/rust/pull/28673
6+
7+
use run_make_support::{fs_wrapper, rustc, static_lib_name};
8+
9+
fn main() {
10+
fs_wrapper::create_file(static_lib_name("foo"));
11+
rustc()
12+
.arg("-")
13+
.crate_type("rlib")
14+
.arg("-lstatic=foo")
15+
.run_fail()
16+
.assert_stderr_contains("failed to add native library");
17+
}

0 commit comments

Comments
 (0)