rewrite compiler-lookup-paths-2 to rmake · rust-lang/rust@2192a91 (original) (raw)

4 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ run-make/c-static-rlib/Makefile
6 6 run-make/c-unwind-abi-catch-lib-panic/Makefile
7 7 run-make/cat-and-grep-sanity-check/Makefile
8 8 run-make/cdylib-dylib-linkage/Makefile
9 -run-make/compiler-lookup-paths-2/Makefile
10 9 run-make/compiler-rt-works-on-mingw/Makefile
11 10 run-make/crate-hash-rustc-version/Makefile
12 11 run-make/cross-lang-lto-clang/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
1 +// This test checks that extern crate declarations in Cargo without a corresponding declaration
2 +// in the manifest of a dependency are NOT allowed. The last rustc call does it anyways, which
3 +// should result in a compilation failure.
4 +// See https://github.com/rust-lang/rust/pull/21113
5 +
6 +use run_make_support::{path, rfs, rust_lib_name, rustc};
7 +
8 +fn main() {
9 + rfs::create_dir("a");
10 + rfs::create_dir("b");
11 +rustc().input("a.rs").run();
12 + rfs::rename(rust_lib_name("a"), path("a").join(rust_lib_name("a")));
13 +rustc().input("b.rs").library_search_path("a").run();
14 + rfs::rename(rust_lib_name("b"), path("b").join(rust_lib_name("b")));
15 +rustc()
16 +.input("c.rs")
17 +.library_search_path("crate=b")
18 +.library_search_path("dependency=a")
19 +.run_fail();
20 +}
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
13 13 use run_make_support::{run, run_with_args, rustc};
14 14
15 15 fn main() {
16 +// Smoke-test that #[bench] isn't entirely broken.
16 17 rustc().arg("--test").input("smokebench.rs").opt().run();
17 18 run_with_args("smokebench", &["--bench"]);
18 19 run_with_args("smokebench", &["--bench", "noiter"]);