From f8333127d72679599ac2dd81bc9cceed7554a32a Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 12 Oct 2021 13:48:26 +0300 Subject: [PATCH] abi: remove redundant `fn_sig` hook from `provide_extern`. --- crates/rustc_codegen_spirv/src/abi.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/rustc_codegen_spirv/src/abi.rs b/crates/rustc_codegen_spirv/src/abi.rs index 15e0b984ce..61e4f73c73 100644 --- a/crates/rustc_codegen_spirv/src/abi.rs +++ b/crates/rustc_codegen_spirv/src/abi.rs @@ -52,16 +52,9 @@ pub(crate) fn provide(providers: &mut Providers) { } pub(crate) fn provide_extern(providers: &mut Providers) { - // See comments in provide(), only this time we use the default *extern* provider. - providers.fn_sig = |tcx, def_id| { - let result = (rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig)(tcx, def_id); - result.map_bound(|mut inner| { - if let SpecAbi::C { .. } = inner.abi { - inner.abi = SpecAbi::Rust; - } - inner - }) - }; + // Reset providers overriden in `provide`, that need to still go through the + // `rustc_metadata::rmeta` decoding, as opposed to being locally computed. + providers.fn_sig = rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig; } /// If a struct contains a pointer to itself, even indirectly, then doing a naiive recursive walk