@@ -9,18 +9,17 @@ use rustc_data_structures::fx::FxHashMap;
99use rustc_errors:: ErrorReported ;
1010use rustc_index:: vec:: Idx ;
1111use rustc_middle:: bug;
12- use rustc_middle:: ty:: layout:: { FnAbiExt , TyAndLayout } ;
12+ use rustc_middle:: ty:: layout:: { FnAbiOf , LayoutOf , TyAndLayout } ;
1313use rustc_middle:: ty:: subst:: SubstsRef ;
1414use rustc_middle:: ty:: {
15- Const , FloatTy , GeneratorSubsts , IntTy , ParamEnv , PolyFnSig , Ty , TyKind , TypeAndMut , UintTy ,
15+ self , Const , FloatTy , GeneratorSubsts , IntTy , ParamEnv , PolyFnSig , Ty , TyKind , TypeAndMut ,
16+ UintTy ,
1617} ;
1718use rustc_span:: def_id:: DefId ;
1819use rustc_span:: Span ;
1920use rustc_span:: DUMMY_SP ;
2021use rustc_target:: abi:: call:: { CastTarget , FnAbi , PassMode , Reg , RegKind } ;
21- use rustc_target:: abi:: {
22- Abi , Align , FieldsShape , LayoutOf , Primitive , Scalar , Size , VariantIdx , Variants ,
23- } ;
22+ use rustc_target:: abi:: { Abi , Align , FieldsShape , Primitive , Scalar , Size , VariantIdx , Variants } ;
2423use std:: cell:: RefCell ;
2524use std:: collections:: hash_map:: Entry ;
2625use std:: fmt;
@@ -150,13 +149,17 @@ impl<'tcx> ConvSpirvType<'tcx> for PointeeTy<'tcx> {
150149 fn spirv_type ( & self , span : Span , cx : & CodegenCx < ' tcx > ) -> Word {
151150 match * self {
152151 PointeeTy :: Ty ( ty) => ty. spirv_type ( span, cx) ,
153- PointeeTy :: Fn ( ty) => FnAbi :: of_fn_ptr ( cx, ty, & [ ] ) . spirv_type ( span, cx) ,
152+ PointeeTy :: Fn ( ty) => cx
153+ . fn_abi_of_fn_ptr ( ty, ty:: List :: empty ( ) )
154+ . spirv_type ( span, cx) ,
154155 }
155156 }
156157 fn spirv_type_immediate ( & self , span : Span , cx : & CodegenCx < ' tcx > ) -> Word {
157158 match * self {
158159 PointeeTy :: Ty ( ty) => ty. spirv_type_immediate ( span, cx) ,
159- PointeeTy :: Fn ( ty) => FnAbi :: of_fn_ptr ( cx, ty, & [ ] ) . spirv_type_immediate ( span, cx) ,
160+ PointeeTy :: Fn ( ty) => cx
161+ . fn_abi_of_fn_ptr ( ty, ty:: List :: empty ( ) )
162+ . spirv_type_immediate ( span, cx) ,
160163 }
161164 }
162165}
0 commit comments