@@ -252,7 +252,6 @@ crate struct CrateLocator<'a> {
252
252
pub target : & ' a Target ,
253
253
pub triple : TargetTriple ,
254
254
pub filesearch : FileSearch < ' a > ,
255
- root : Option < & ' a CratePaths > ,
256
255
pub is_proc_macro : bool ,
257
256
258
257
// Mutable in-progress state or output.
@@ -301,7 +300,6 @@ impl<'a> CrateLocator<'a> {
301
300
extra_filename : Option < & ' a str > ,
302
301
is_host : bool ,
303
302
path_kind : PathKind ,
304
- root : Option < & ' a CratePaths > ,
305
303
) -> CrateLocator < ' a > {
306
304
// The all loop is because `--crate-type=rlib --crate-type=rlib` is
307
305
// legal and produces both inside this type.
@@ -344,7 +342,6 @@ impl<'a> CrateLocator<'a> {
344
342
} else {
345
343
sess. target_filesearch ( path_kind)
346
344
} ,
347
- root,
348
345
is_proc_macro : false ,
349
346
rejected_via_hash : Vec :: new ( ) ,
350
347
rejected_via_triple : Vec :: new ( ) ,
@@ -709,10 +706,10 @@ impl<'a> CrateLocator<'a> {
709
706
Ok ( self . extract_lib ( rlibs, rmetas, dylibs) ?. map ( |( _, lib) | lib) )
710
707
}
711
708
712
- crate fn into_error ( self ) -> CrateError {
709
+ crate fn into_error ( self , root : Option < CratePaths > ) -> CrateError {
713
710
CrateError :: LocatorCombined ( CombinedLocatorError {
714
711
crate_name : self . crate_name ,
715
- root : self . root . cloned ( ) ,
712
+ root,
716
713
triple : self . triple ,
717
714
dll_prefix : self . target . dll_prefix . clone ( ) ,
718
715
dll_suffix : self . target . dll_suffix . clone ( ) ,
@@ -807,15 +804,14 @@ fn find_plugin_registrar_impl<'a>(
807
804
None , // extra_filename
808
805
true , // is_host
809
806
PathKind :: Crate ,
810
- None , // root
811
807
) ;
812
808
813
809
match locator. maybe_load_library_crate ( ) ? {
814
810
Some ( library) => match library. source . dylib {
815
811
Some ( dylib) => Ok ( dylib. 0 ) ,
816
812
None => Err ( CrateError :: NonDylibPlugin ( name) ) ,
817
813
} ,
818
- None => Err ( locator. into_error ( ) ) ,
814
+ None => Err ( locator. into_error ( None ) ) ,
819
815
}
820
816
}
821
817
0 commit comments