@@ -52,7 +52,7 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
5252 // as we'll get a duplicate matching versions. Instead, disambiguate with
5353 // `--extern dep=path`.
5454 // See https://github.com/rust-lang/rust-clippy/issues/4015.
55- let needs_disambiguation = [ "serde" ] ;
55+ let needs_disambiguation = [ "serde" , "regex" , "clippy_lints" ] ;
5656 // This assumes that deps are compiled (they are for Cargo integration tests).
5757 let deps = std:: fs:: read_dir ( host_libs ( ) . join ( "deps" ) ) . unwrap ( ) ;
5858 let disambiguated = deps
@@ -62,7 +62,7 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
6262 // NOTE: This only handles a single dep
6363 // https://github.com/laumann/compiletest-rs/issues/101
6464 needs_disambiguation. iter ( ) . find_map ( |dep| {
65- if name. starts_with ( & format ! ( "lib{}-" , dep) ) {
65+ if name. starts_with ( & format ! ( "lib{}-" , dep) ) && name . ends_with ( ".rlib" ) {
6666 Some ( format ! ( "--extern {}={}" , dep, path. display( ) ) )
6767 } else {
6868 None
@@ -95,8 +95,6 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config {
9595
9696fn run_mode ( mode : & str , dir : PathBuf ) {
9797 let cfg = config ( mode, dir) ;
98- // clean rmeta data, otherwise "cargo check; cargo test" fails (#2896)
99- cfg. clean_rmeta ( ) ;
10098 compiletest:: run_tests ( & cfg) ;
10199}
102100
0 commit comments