File tree Expand file tree Collapse file tree 3 files changed +31
-36
lines changed
tests/run-make/many-crates-but-no-match Expand file tree Collapse file tree 3 files changed +31
-36
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ run-make/lto-smoke-c/Makefile
100100run-make/macos-deployment-target/Makefile
101101run-make/macos-fat-archive/Makefile
102102run-make/manual-link/Makefile
103- run-make/many-crates-but-no-match/Makefile
104103run-make/metadata-dep-info/Makefile
105104run-make/min-global-align/Makefile
106105run-make/mingw-export-call-convention/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // An extended version of the ui/changing-crates.rs test, this test puts
2+ // multiple mismatching crates into the search path of crateC (A2 and A3)
3+ // and checks that the standard error contains helpful messages to indicate
4+ // what should be done to fix the issue.
5+ // See https://github.com/rust-lang/rust/issues/13266
6+
7+ use run_make_support:: { fs_wrapper, rustc} ;
8+
9+ fn main ( ) {
10+ fs_wrapper:: create_dir ( "a1" ) ;
11+ fs_wrapper:: create_dir ( "a2" ) ;
12+ fs_wrapper:: create_dir ( "a3" ) ;
13+ rustc ( ) . crate_type ( "rlib" ) . out_dir ( "a1" ) . input ( "crateA1.rs" ) . run ( ) ;
14+ rustc ( ) . crate_type ( "rlib" ) . library_search_path ( "a1" ) . input ( "crateB.rs" ) . run ( ) ;
15+ rustc ( ) . crate_type ( "rlib" ) . out_dir ( "a2" ) . input ( "crateA2.rs" ) . run ( ) ;
16+ rustc ( ) . crate_type ( "rlib" ) . out_dir ( "a3" ) . input ( "crateA3.rs" ) . run ( ) ;
17+ // Ensure crateC fails to compile since A1 is "missing" and A2/A3 hashes do not match
18+ rustc ( )
19+ . crate_type ( "rlib" )
20+ . library_search_path ( "a2" )
21+ . library_search_path ( "a3" )
22+ . input ( "crateC.rs" )
23+ . run_fail ( )
24+ . assert_stderr_contains (
25+ "found possibly newer version of crate `crateA` which `crateB` depends on" ,
26+ )
27+ . assert_stderr_contains ( "note: perhaps that crate needs to be recompiled?" )
28+ . assert_stderr_contains ( "crate `crateA`:" )
29+ . assert_stderr_contains ( "crate `crateB`:" ) ;
30+ // the 'crate `crateA`' will match two entries.
31+ }
You can’t perform that action at this time.
0 commit comments