diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index 5968fc258dc60..0704c9a40e20b 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -450,6 +450,7 @@ impl<'a> CrateLoader<'a> { &self, locator: &mut CrateLocator<'b>, path_kind: PathKind, + host_hash: Option, ) -> Result)>, CrateError> where 'a: 'b, @@ -471,7 +472,7 @@ impl<'a> CrateLoader<'a> { Some(LoadResult::Loaded(library)) => Some(LoadResult::Loaded(library)), None => return Ok(None), }; - locator.hash = locator.host_hash; + locator.hash = host_hash; // Use the locator when looking for the host proc macro crate, as that is required // so we want it to affect the error message (locator, result) @@ -551,7 +552,6 @@ impl<'a> CrateLoader<'a> { &*self.metadata_loader, name, hash, - host_hash, extra_filename, false, // is_host path_kind, @@ -562,7 +562,7 @@ impl<'a> CrateLoader<'a> { Some(res) => (res, None), None => { dep_kind = CrateDepKind::MacrosOnly; - match self.load_proc_macro(&mut locator, path_kind)? { + match self.load_proc_macro(&mut locator, path_kind, host_hash)? { Some(res) => res, None => return Err(locator.into_error()), } diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index 75efad22b5d1b..f0996f2fd28a0 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -248,7 +248,6 @@ crate struct CrateLocator<'a> { crate_name: Symbol, exact_paths: Vec, pub hash: Option, - pub host_hash: Option, extra_filename: Option<&'a str>, pub target: &'a Target, pub triple: TargetTriple, @@ -299,7 +298,6 @@ impl<'a> CrateLocator<'a> { metadata_loader: &'a dyn MetadataLoader, crate_name: Symbol, hash: Option, - host_hash: Option, extra_filename: Option<&'a str>, is_host: bool, path_kind: PathKind, @@ -334,7 +332,6 @@ impl<'a> CrateLocator<'a> { Vec::new() }, hash, - host_hash, extra_filename, target: if is_host { &sess.host } else { &sess.target }, triple: if is_host { @@ -807,7 +804,6 @@ fn find_plugin_registrar_impl<'a>( metadata_loader, name, None, // hash - None, // host_hash None, // extra_filename true, // is_host PathKind::Crate,