This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -75,7 +75,6 @@ run-make/macos-deployment-target/Makefile
75
75
run-make/macos-fat-archive/Makefile
76
76
run-make/manual-link/Makefile
77
77
run-make/min-global-align/Makefile
78
- run-make/missing-crate-dependency/Makefile
79
78
run-make/native-link-modifier-bundle/Makefile
80
79
run-make/native-link-modifier-whole-archive/Makefile
81
80
run-make/no-alloc-shim/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