@@ -12,7 +12,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
1212 abi : Abi ,
1313 link_name : Symbol ,
1414 args : & [ OpTy < ' tcx , Provenance > ] ,
15- dest : & PlaceTy < ' tcx , Provenance > ,
15+ dest : & MPlaceTy < ' tcx , Provenance > ,
1616 ) -> InterpResult < ' tcx > {
1717 let this = self . eval_context_mut ( ) ;
1818 let [ flags] = this. check_shim ( abi, Abi :: Rust , link_name, args) ?;
@@ -32,7 +32,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
3232 abi : Abi ,
3333 link_name : Symbol ,
3434 args : & [ OpTy < ' tcx , Provenance > ] ,
35- dest : & PlaceTy < ' tcx , Provenance > ,
35+ dest : & MPlaceTy < ' tcx , Provenance > ,
3636 ) -> InterpResult < ' tcx > {
3737 let this = self . eval_context_mut ( ) ;
3838 let tcx = this. tcx ;
@@ -145,7 +145,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
145145 abi : Abi ,
146146 link_name : Symbol ,
147147 args : & [ OpTy < ' tcx , Provenance > ] ,
148- dest : & PlaceTy < ' tcx , Provenance > ,
148+ dest : & MPlaceTy < ' tcx , Provenance > ,
149149 ) -> InterpResult < ' tcx > {
150150 let this = self . eval_context_mut ( ) ;
151151 let [ ptr, flags] = this. check_shim ( abi, Abi :: Rust , link_name, args) ?;
@@ -174,7 +174,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
174174 // `lo.col` is 0-based - add 1 to make it 1-based for the caller.
175175 let colno: u32 = u32:: try_from ( lo. col . 0 . saturating_add ( 1 ) ) . unwrap_or ( 0 ) ;
176176
177- let dest = this. force_allocation ( dest) ?;
178177 if let ty:: Adt ( adt, _) = dest. layout . ty . kind ( ) {
179178 if !adt. repr ( ) . c ( ) {
180179 throw_ub_format ! (
@@ -191,29 +190,29 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
191190 let filename_alloc =
192191 this. allocate_str ( & filename, MiriMemoryKind :: Rust . into ( ) , Mutability :: Mut ) ?;
193192
194- this. write_immediate ( name_alloc. to_ref ( this) , & this. project_field ( & dest, 0 ) ?) ?;
195- this. write_immediate ( filename_alloc. to_ref ( this) , & this. project_field ( & dest, 1 ) ?) ?;
193+ this. write_immediate ( name_alloc. to_ref ( this) , & this. project_field ( dest, 0 ) ?) ?;
194+ this. write_immediate ( filename_alloc. to_ref ( this) , & this. project_field ( dest, 1 ) ?) ?;
196195 }
197196 1 => {
198197 this. write_scalar (
199198 Scalar :: from_target_usize ( name. len ( ) . try_into ( ) . unwrap ( ) , this) ,
200- & this. project_field ( & dest, 0 ) ?,
199+ & this. project_field ( dest, 0 ) ?,
201200 ) ?;
202201 this. write_scalar (
203202 Scalar :: from_target_usize ( filename. len ( ) . try_into ( ) . unwrap ( ) , this) ,
204- & this. project_field ( & dest, 1 ) ?,
203+ & this. project_field ( dest, 1 ) ?,
205204 ) ?;
206205 }
207206 _ => throw_unsup_format ! ( "unknown `miri_resolve_frame` flags {}" , flags) ,
208207 }
209208
210- this. write_scalar ( Scalar :: from_u32 ( lineno) , & this. project_field ( & dest, 2 ) ?) ?;
211- this. write_scalar ( Scalar :: from_u32 ( colno) , & this. project_field ( & dest, 3 ) ?) ?;
209+ this. write_scalar ( Scalar :: from_u32 ( lineno) , & this. project_field ( dest, 2 ) ?) ?;
210+ this. write_scalar ( Scalar :: from_u32 ( colno) , & this. project_field ( dest, 3 ) ?) ?;
212211
213212 // Support a 4-field struct for now - this is deprecated
214213 // and slated for removal.
215214 if num_fields == 5 {
216- this. write_pointer ( fn_ptr, & this. project_field ( & dest, 4 ) ?) ?;
215+ this. write_pointer ( fn_ptr, & this. project_field ( dest, 4 ) ?) ?;
217216 }
218217
219218 Ok ( ( ) )
0 commit comments