@@ -252,7 +252,6 @@ crate struct CrateLocator<'a> {
252252 pub target : & ' a Target ,
253253 pub triple : TargetTriple ,
254254 pub filesearch : FileSearch < ' a > ,
255- root : Option < & ' a CratePaths > ,
256255 pub is_proc_macro : bool ,
257256
258257 // Mutable in-progress state or output.
@@ -301,7 +300,6 @@ impl<'a> CrateLocator<'a> {
301300 extra_filename : Option < & ' a str > ,
302301 is_host : bool ,
303302 path_kind : PathKind ,
304- root : Option < & ' a CratePaths > ,
305303 ) -> CrateLocator < ' a > {
306304 // The all loop is because `--crate-type=rlib --crate-type=rlib` is
307305 // legal and produces both inside this type.
@@ -344,7 +342,6 @@ impl<'a> CrateLocator<'a> {
344342 } else {
345343 sess. target_filesearch ( path_kind)
346344 } ,
347- root,
348345 is_proc_macro : false ,
349346 rejected_via_hash : Vec :: new ( ) ,
350347 rejected_via_triple : Vec :: new ( ) ,
@@ -709,10 +706,10 @@ impl<'a> CrateLocator<'a> {
709706 Ok ( self . extract_lib ( rlibs, rmetas, dylibs) ?. map ( |( _, lib) | lib) )
710707 }
711708
712- crate fn into_error ( self ) -> CrateError {
709+ crate fn into_error ( self , root : Option < CratePaths > ) -> CrateError {
713710 CrateError :: LocatorCombined ( CombinedLocatorError {
714711 crate_name : self . crate_name ,
715- root : self . root . cloned ( ) ,
712+ root,
716713 triple : self . triple ,
717714 dll_prefix : self . target . dll_prefix . clone ( ) ,
718715 dll_suffix : self . target . dll_suffix . clone ( ) ,
@@ -807,15 +804,14 @@ fn find_plugin_registrar_impl<'a>(
807804 None , // extra_filename
808805 true , // is_host
809806 PathKind :: Crate ,
810- None , // root
811807 ) ;
812808
813809 match locator. maybe_load_library_crate ( ) ? {
814810 Some ( library) => match library. source . dylib {
815811 Some ( dylib) => Ok ( dylib. 0 ) ,
816812 None => Err ( CrateError :: NonDylibPlugin ( name) ) ,
817813 } ,
818- None => Err ( locator. into_error ( ) ) ,
814+ None => Err ( locator. into_error ( None ) ) ,
819815 }
820816}
821817
0 commit comments