File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed
tests/run-make/missing-crate-dependency Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ run-make/macos-deployment-target/Makefile
7878run-make/macos-fat-archive/Makefile
7979run-make/manual-link/Makefile
8080run-make/min-global-align/Makefile
81- run-make/missing-crate-dependency/Makefile
8281run-make/mixing-libs/Makefile
8382run-make/native-link-modifier-bundle/Makefile
8483run-make/native-link-modifier-whole-archive/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // A simple smoke test to check that rustc fails compilation
2+ // and outputs a helpful message when a dependency is missing
3+ // in a dependency chain.
4+ // See https://github.com/rust-lang/rust/issues/12146
5+
6+ use run_make_support:: { fs_wrapper, rust_lib_name, rustc} ;
7+
8+ fn main ( ) {
9+ rustc ( ) . crate_type ( "rlib" ) . input ( "crateA.rs" ) . run ( ) ;
10+ rustc ( ) . crate_type ( "rlib" ) . input ( "crateB.rs" ) . run ( ) ;
11+ fs_wrapper:: remove_file ( rust_lib_name ( "crateA" ) ) ;
12+ // Ensure that crateC fails to compile, as the crateA dependency is missing.
13+ rustc ( )
14+ . input ( "crateC.rs" )
15+ . run_fail ( )
16+ . assert_stderr_contains ( "can't find crate for `crateA` which `crateB` depends on" ) ;
17+ }
You can’t perform that action at this time.
0 commit comments