@@ -223,7 +223,7 @@ use rustc_data_structures::sync::MetadataRef;
223223use rustc_errors:: { struct_span_err, FatalError } ;
224224use rustc_session:: config:: { self , CrateType } ;
225225use rustc_session:: cstore:: { CrateSource , MetadataLoader } ;
226- use rustc_session:: filesearch:: { FileDoesntMatch , FileMatches , FileSearch } ;
226+ use rustc_session:: filesearch:: FileSearch ;
227227use rustc_session:: search_paths:: PathKind ;
228228use rustc_session:: utils:: CanonicalizedPath ;
229229use rustc_session:: Session ;
@@ -396,7 +396,7 @@ impl<'a> CrateLocator<'a> {
396396 // The goal of this step is to look at as little metadata as possible.
397397 self . filesearch . search ( |spf, kind| {
398398 let file = match & spf. file_name_str {
399- None => return FileDoesntMatch ,
399+ None => return ,
400400 Some ( file) => file,
401401 } ;
402402 let ( hash, found_kind) = if file. starts_with ( & rlib_prefix) && file. ends_with ( ".rlib" ) {
@@ -415,23 +415,22 @@ impl<'a> CrateLocator<'a> {
415415 staticlibs
416416 . push ( CrateMismatch { path : spf. path . clone ( ) , got : "static" . to_string ( ) } ) ;
417417 }
418- return FileDoesntMatch ;
418+ return ;
419419 } ;
420420
421421 info ! ( "lib candidate: {}" , spf. path. display( ) ) ;
422422
423423 let ( rlibs, rmetas, dylibs) = candidates. entry ( hash. to_string ( ) ) . or_default ( ) ;
424424 let path = fs:: canonicalize ( & spf. path ) . unwrap_or_else ( |_| spf. path . clone ( ) ) ;
425425 if seen_paths. contains ( & path) {
426- return FileDoesntMatch ;
426+ return ;
427427 } ;
428428 seen_paths. insert ( path. clone ( ) ) ;
429429 match found_kind {
430430 CrateFlavor :: Rlib => rlibs. insert ( path, kind) ,
431431 CrateFlavor :: Rmeta => rmetas. insert ( path, kind) ,
432432 CrateFlavor :: Dylib => dylibs. insert ( path, kind) ,
433433 } ;
434- FileMatches
435434 } ) ;
436435 self . crate_rejections . via_kind . extend ( staticlibs) ;
437436
0 commit comments