Skip to content

Commit 2192a91

Browse files
committed
rewrite compiler-lookup-paths-2 to rmake
1 parent 2733494 commit 2192a91

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ run-make/c-static-rlib/Makefile
66
run-make/c-unwind-abi-catch-lib-panic/Makefile
77
run-make/cat-and-grep-sanity-check/Makefile
88
run-make/cdylib-dylib-linkage/Makefile
9-
run-make/compiler-lookup-paths-2/Makefile
109
run-make/compiler-rt-works-on-mingw/Makefile
1110
run-make/crate-hash-rustc-version/Makefile
1211
run-make/cross-lang-lto-clang/Makefile

tests/run-make/compiler-lookup-paths-2/Makefile

-11
This file was deleted.
Original file line numberDiff line numberDiff 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+
}

tests/run-make/test-benches/rmake.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use run_make_support::{run, run_with_args, rustc};
1414

1515
fn main() {
16+
// Smoke-test that #[bench] isn't entirely broken.
1617
rustc().arg("--test").input("smokebench.rs").opt().run();
1718
run_with_args("smokebench", &["--bench"]);
1819
run_with_args("smokebench", &["--bench", "noiter"]);

0 commit comments

Comments
 (0)