-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite compiler-lookup-paths-2 to rmake
- Loading branch information
Showing
3 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// This test checks that extern crate declarations in Cargo without a corresponding declaration | ||
// in the manifest of a dependency are NOT allowed. The last rustc call does it anyways, which | ||
// should result in a compilation failure. | ||
// See https://github.com/rust-lang/rust/pull/21113 | ||
|
||
use run_make_support::{path, rfs, rust_lib_name, rustc}; | ||
|
||
fn main() { | ||
rfs::create_dir("a"); | ||
rfs::create_dir("b"); | ||
rustc().input("a.rs").run(); | ||
rfs::rename(rust_lib_name("a"), path("a").join(rust_lib_name("a"))); | ||
rustc().input("b.rs").library_search_path("a").run(); | ||
rfs::rename(rust_lib_name("b"), path("b").join(rust_lib_name("b"))); | ||
rustc() | ||
.input("c.rs") | ||
.library_search_path("crate=b") | ||
.library_search_path("dependency=a") | ||
.run_fail(); | ||
} |