11use rustc_abi:: { ExternAbi , Size } ;
2+ use rustc_ast:: ast:: Mutability ;
23use rustc_middle:: ty:: layout:: LayoutOf as _;
34use rustc_middle:: ty:: { self , Instance , Ty } ;
45use rustc_span:: { BytePos , Loc , Symbol , hygiene} ;
6+ use rustc_target:: callconv:: FnAbi ;
7+ use rustc_target:: callconv:: Conv ;
58
69use crate :: helpers:: check_min_arg_count;
710use crate :: * ;
@@ -10,13 +13,13 @@ impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {}
1013pub trait EvalContextExt < ' tcx > : crate :: MiriInterpCxExt < ' tcx > {
1114 fn handle_miri_backtrace_size (
1215 & mut self ,
13- abi : ExternAbi ,
16+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
1417 link_name : Symbol ,
1518 args : & [ OpTy < ' tcx > ] ,
1619 dest : & MPlaceTy < ' tcx > ,
1720 ) -> InterpResult < ' tcx > {
1821 let this = self . eval_context_mut ( ) ;
19- let [ flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
22+ let [ flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
2023
2124 let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
2225 if flags != 0 {
@@ -30,7 +33,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
3033
3134 fn handle_miri_get_backtrace (
3235 & mut self ,
33- abi : ExternAbi ,
36+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
3437 link_name : Symbol ,
3538 args : & [ OpTy < ' tcx > ] ,
3639 dest : & MPlaceTy < ' tcx > ,
@@ -71,7 +74,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
7174 // storage for pointers is allocated by miri
7275 // deallocating the slice is undefined behavior with a custom global allocator
7376 0 => {
74- let [ _flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
77+ let [ _flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
7578
7679 let alloc = this. allocate ( array_layout, MiriMemoryKind :: Rust . into ( ) ) ?;
7780
@@ -86,7 +89,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
8689 }
8790 // storage for pointers is allocated by the caller
8891 1 => {
89- let [ _flags, buf] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
92+ let [ _flags, buf] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
9093
9194 let buf_place = this. deref_pointer ( buf) ?;
9295
@@ -136,13 +139,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
136139
137140 fn handle_miri_resolve_frame (
138141 & mut self ,
139- abi : ExternAbi ,
142+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
140143 link_name : Symbol ,
141144 args : & [ OpTy < ' tcx > ] ,
142145 dest : & MPlaceTy < ' tcx > ,
143146 ) -> InterpResult < ' tcx > {
144147 let this = self . eval_context_mut ( ) ;
145- let [ ptr, flags] = this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
148+ let [ ptr, flags] = this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
146149
147150 let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
148151
@@ -207,14 +210,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
207210
208211 fn handle_miri_resolve_frame_names (
209212 & mut self ,
210- abi : ExternAbi ,
213+ abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
211214 link_name : Symbol ,
212215 args : & [ OpTy < ' tcx > ] ,
213216 ) -> InterpResult < ' tcx > {
214217 let this = self . eval_context_mut ( ) ;
215218
216219 let [ ptr, flags, name_ptr, filename_ptr] =
217- this. check_shim ( abi, ExternAbi :: Rust , link_name, args) ?;
220+ this. check_shim ( abi, Conv :: Rust , link_name, args) ?;
218221
219222 let flags = this. read_scalar ( flags) ?. to_u64 ( ) ?;
220223 if flags != 0 {
0 commit comments