Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 51cc485

Browse files
committedJul 19, 2024
rewrite compiler-lookup-paths-2 to rmake
1 parent 2733494 commit 51cc485

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-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+
}

0 commit comments

Comments
 (0)
Failed to load comments.