@@ -12,7 +12,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
12
12
abi : Abi ,
13
13
link_name : Symbol ,
14
14
args : & [ OpTy < ' tcx , Provenance > ] ,
15
- dest : & PlaceTy < ' tcx , Provenance > ,
15
+ dest : & MPlaceTy < ' tcx , Provenance > ,
16
16
) -> InterpResult < ' tcx > {
17
17
let this = self . eval_context_mut ( ) ;
18
18
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> {
32
32
abi : Abi ,
33
33
link_name : Symbol ,
34
34
args : & [ OpTy < ' tcx , Provenance > ] ,
35
- dest : & PlaceTy < ' tcx , Provenance > ,
35
+ dest : & MPlaceTy < ' tcx , Provenance > ,
36
36
) -> InterpResult < ' tcx > {
37
37
let this = self . eval_context_mut ( ) ;
38
38
let tcx = this. tcx ;
@@ -145,7 +145,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
145
145
abi : Abi ,
146
146
link_name : Symbol ,
147
147
args : & [ OpTy < ' tcx , Provenance > ] ,
148
- dest : & PlaceTy < ' tcx , Provenance > ,
148
+ dest : & MPlaceTy < ' tcx , Provenance > ,
149
149
) -> InterpResult < ' tcx > {
150
150
let this = self . eval_context_mut ( ) ;
151
151
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> {
174
174
// `lo.col` is 0-based - add 1 to make it 1-based for the caller.
175
175
let colno: u32 = u32:: try_from ( lo. col . 0 . saturating_add ( 1 ) ) . unwrap_or ( 0 ) ;
176
176
177
- let dest = this. force_allocation ( dest) ?;
178
177
if let ty:: Adt ( adt, _) = dest. layout . ty . kind ( ) {
179
178
if !adt. repr ( ) . c ( ) {
180
179
throw_ub_format ! (
@@ -191,29 +190,29 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
191
190
let filename_alloc =
192
191
this. allocate_str ( & filename, MiriMemoryKind :: Rust . into ( ) , Mutability :: Mut ) ?;
193
192
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 ) ?) ?;
196
195
}
197
196
1 => {
198
197
this. write_scalar (
199
198
Scalar :: from_target_usize ( name. len ( ) . try_into ( ) . unwrap ( ) , this) ,
200
- & this. project_field ( & dest, 0 ) ?,
199
+ & this. project_field ( dest, 0 ) ?,
201
200
) ?;
202
201
this. write_scalar (
203
202
Scalar :: from_target_usize ( filename. len ( ) . try_into ( ) . unwrap ( ) , this) ,
204
- & this. project_field ( & dest, 1 ) ?,
203
+ & this. project_field ( dest, 1 ) ?,
205
204
) ?;
206
205
}
207
206
_ => throw_unsup_format ! ( "unknown `miri_resolve_frame` flags {}" , flags) ,
208
207
}
209
208
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 ) ?) ?;
212
211
213
212
// Support a 4-field struct for now - this is deprecated
214
213
// and slated for removal.
215
214
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 ) ?) ?;
217
216
}
218
217
219
218
Ok ( ( ) )
0 commit comments