@@ -9,18 +9,17 @@ use rustc_data_structures::fx::FxHashMap;
9
9
use rustc_errors:: ErrorReported ;
10
10
use rustc_index:: vec:: Idx ;
11
11
use rustc_middle:: bug;
12
- use rustc_middle:: ty:: layout:: { FnAbiExt , TyAndLayout } ;
12
+ use rustc_middle:: ty:: layout:: { FnAbiOf , LayoutOf , TyAndLayout } ;
13
13
use rustc_middle:: ty:: subst:: SubstsRef ;
14
14
use 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 ,
16
17
} ;
17
18
use rustc_span:: def_id:: DefId ;
18
19
use rustc_span:: Span ;
19
20
use rustc_span:: DUMMY_SP ;
20
21
use 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 } ;
24
23
use std:: cell:: RefCell ;
25
24
use std:: collections:: hash_map:: Entry ;
26
25
use std:: fmt;
@@ -150,13 +149,17 @@ impl<'tcx> ConvSpirvType<'tcx> for PointeeTy<'tcx> {
150
149
fn spirv_type ( & self , span : Span , cx : & CodegenCx < ' tcx > ) -> Word {
151
150
match * self {
152
151
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) ,
154
155
}
155
156
}
156
157
fn spirv_type_immediate ( & self , span : Span , cx : & CodegenCx < ' tcx > ) -> Word {
157
158
match * self {
158
159
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) ,
160
163
}
161
164
}
162
165
}
0 commit comments