Skip to content

Commit f833312

Browse files
committed
abi: remove redundant fn_sig hook from provide_extern.
1 parent 1436572 commit f833312

File tree

1 file changed

+3
-10
lines changed
  • crates/rustc_codegen_spirv/src

1 file changed

+3
-10
lines changed

crates/rustc_codegen_spirv/src/abi.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,9 @@ pub(crate) fn provide(providers: &mut Providers) {
5252
}
5353

5454
pub(crate) fn provide_extern(providers: &mut Providers) {
55-
// See comments in provide(), only this time we use the default *extern* provider.
56-
providers.fn_sig = |tcx, def_id| {
57-
let result = (rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig)(tcx, def_id);
58-
result.map_bound(|mut inner| {
59-
if let SpecAbi::C { .. } = inner.abi {
60-
inner.abi = SpecAbi::Rust;
61-
}
62-
inner
63-
})
64-
};
55+
// Reset providers overriden in `provide`, that need to still go through the
56+
// `rustc_metadata::rmeta` decoding, as opposed to being locally computed.
57+
providers.fn_sig = rustc_interface::DEFAULT_EXTERN_QUERY_PROVIDERS.fn_sig;
6558
}
6659

6760
/// If a struct contains a pointer to itself, even indirectly, then doing a naiive recursive walk

0 commit comments

Comments
 (0)