1
1
use crate :: abi:: { self , Abi , Align , FieldsShape , Size } ;
2
2
use crate :: abi:: { HasDataLayout , LayoutOf , TyAndLayout , TyAndLayoutMethods } ;
3
- use crate :: spec:: { self , HasTargetSpec , Target } ;
3
+ use crate :: spec:: { self , HasTargetSpec } ;
4
4
5
5
mod aarch64;
6
6
mod amdgpu;
@@ -631,10 +631,9 @@ impl<'a, Ty> FnAbi<'a, Ty> {
631
631
"nvptx64" => nvptx64:: compute_abi_info ( self ) ,
632
632
"hexagon" => hexagon:: compute_abi_info ( self ) ,
633
633
"riscv32" | "riscv64" => riscv:: compute_abi_info ( cx, self ) ,
634
- "wasm32" => if use_wasm_bindgen_compat_abi ( cx. target_spec ( ) ) {
635
- wasm32_bindgen_compat:: compute_abi_info ( self )
636
- } else {
637
- wasm32:: compute_abi_info ( cx, self )
634
+ "wasm32" => match cx. target_spec ( ) . os . as_str ( ) {
635
+ "emscripten" | "wasi" => wasm32:: compute_abi_info ( cx, self ) ,
636
+ _ => wasm32_bindgen_compat:: compute_abi_info ( self ) ,
638
637
} ,
639
638
"asmjs" => wasm32:: compute_abi_info ( cx, self ) ,
640
639
a => return Err ( format ! ( "unrecognized arch \" {}\" in target specification" , a) ) ,
@@ -643,14 +642,3 @@ impl<'a, Ty> FnAbi<'a, Ty> {
643
642
Ok ( ( ) )
644
643
}
645
644
}
646
-
647
- pub fn use_wasm_bindgen_compat_abi ( target_spec : & Target ) -> bool {
648
- if target_spec. arch . as_str ( ) == "wasm32" {
649
- match target_spec. os . as_str ( ) {
650
- "emscripten" | "wasi" => false ,
651
- _ => true ,
652
- }
653
- } else {
654
- false
655
- }
656
- }
0 commit comments