@@ -223,7 +223,7 @@ use rustc_data_structures::sync::MetadataRef;
223
223
use rustc_errors:: { struct_span_err, FatalError } ;
224
224
use rustc_session:: config:: { self , CrateType } ;
225
225
use rustc_session:: cstore:: { CrateSource , MetadataLoader } ;
226
- use rustc_session:: filesearch:: { FileDoesntMatch , FileMatches , FileSearch } ;
226
+ use rustc_session:: filesearch:: FileSearch ;
227
227
use rustc_session:: search_paths:: PathKind ;
228
228
use rustc_session:: utils:: CanonicalizedPath ;
229
229
use rustc_session:: Session ;
@@ -396,7 +396,7 @@ impl<'a> CrateLocator<'a> {
396
396
// The goal of this step is to look at as little metadata as possible.
397
397
self . filesearch . search ( |spf, kind| {
398
398
let file = match & spf. file_name_str {
399
- None => return FileDoesntMatch ,
399
+ None => return ,
400
400
Some ( file) => file,
401
401
} ;
402
402
let ( hash, found_kind) = if file. starts_with ( & rlib_prefix) && file. ends_with ( ".rlib" ) {
@@ -415,23 +415,22 @@ impl<'a> CrateLocator<'a> {
415
415
staticlibs
416
416
. push ( CrateMismatch { path : spf. path . clone ( ) , got : "static" . to_string ( ) } ) ;
417
417
}
418
- return FileDoesntMatch ;
418
+ return ;
419
419
} ;
420
420
421
421
info ! ( "lib candidate: {}" , spf. path. display( ) ) ;
422
422
423
423
let ( rlibs, rmetas, dylibs) = candidates. entry ( hash. to_string ( ) ) . or_default ( ) ;
424
424
let path = fs:: canonicalize ( & spf. path ) . unwrap_or_else ( |_| spf. path . clone ( ) ) ;
425
425
if seen_paths. contains ( & path) {
426
- return FileDoesntMatch ;
426
+ return ;
427
427
} ;
428
428
seen_paths. insert ( path. clone ( ) ) ;
429
429
match found_kind {
430
430
CrateFlavor :: Rlib => rlibs. insert ( path, kind) ,
431
431
CrateFlavor :: Rmeta => rmetas. insert ( path, kind) ,
432
432
CrateFlavor :: Dylib => dylibs. insert ( path, kind) ,
433
433
} ;
434
- FileMatches
435
434
} ) ;
436
435
self . crate_rejections . via_kind . extend ( staticlibs) ;
437
436
0 commit comments