File tree 1 file changed +2
-2
lines changed
crates/rustc_codegen_spirv/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,14 @@ pub(crate) fn provide(providers: &mut Providers) {
37
37
// This theoretically then should be fine to leave as C, but, there's no backend hook for
38
38
// FnAbi::adjust_for_cabi, causing it to panic:
39
39
// https://github.com/rust-lang/rust/blob/5fae56971d8487088c0099c82c0a5ce1638b5f62/compiler/rustc_target/src/abi/call/mod.rs#L603
40
- // So, treat any extern "C" functions as actually being Rust ABI , to be able to compile libcore with arch=spirv.
40
+ // So, treat any ` extern "C"` functions as `extern "unadjusted"` , to be able to compile libcore with arch=spirv.
41
41
providers. fn_sig = |tcx, def_id| {
42
42
// We can't capture the old fn_sig and just call that, because fn_sig is a `fn`, not a `Fn`, i.e. it can't
43
43
// capture variables. Fortunately, the defaults are exposed (thanks rustdoc), so use that instead.
44
44
let result = ( rustc_interface:: DEFAULT_QUERY_PROVIDERS . fn_sig ) ( tcx, def_id) ;
45
45
result. map_bound ( |mut inner| {
46
46
if let SpecAbi :: C { .. } = inner. abi {
47
- inner. abi = SpecAbi :: Rust ;
47
+ inner. abi = SpecAbi :: Unadjusted ;
48
48
}
49
49
inner
50
50
} )
You can’t perform that action at this time.
0 commit comments