@@ -25,7 +25,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
2525
2626 let frame_count = this. active_thread_stack ( ) . len ( ) ;
2727
28- this. write_scalar ( Scalar :: from_target_usize ( frame_count. try_into ( ) . unwrap ( ) , this) , dest)
28+ this. write_scalar ( Scalar :: from_target_usize ( frame_count. to_u64 ( ) , this) , dest)
2929 }
3030
3131 fn handle_miri_get_backtrace (
@@ -70,7 +70,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
7070 }
7171 1 =>
7272 for ( i, ptr) in ptrs. into_iter ( ) . enumerate ( ) {
73- let offset = ptr_layout. size . checked_mul ( i. try_into ( ) . unwrap ( ) , this) . unwrap ( ) ;
73+ let offset = ptr_layout. size . checked_mul ( i. to_u64 ( ) , this) . unwrap ( ) ;
7474
7575 let op_place = buf_place. offset ( offset, ptr_layout, this) ?;
7676
@@ -158,11 +158,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
158158 }
159159 1 => {
160160 this. write_scalar (
161- Scalar :: from_target_usize ( name. len ( ) . try_into ( ) . unwrap ( ) , this) ,
161+ Scalar :: from_target_usize ( name. len ( ) . to_u64 ( ) , this) ,
162162 & this. project_field ( dest, 0 ) ?,
163163 ) ?;
164164 this. write_scalar (
165- Scalar :: from_target_usize ( filename. len ( ) . try_into ( ) . unwrap ( ) , this) ,
165+ Scalar :: from_target_usize ( filename. len ( ) . to_u64 ( ) , this) ,
166166 & this. project_field ( dest, 1 ) ?,
167167 ) ?;
168168 }
0 commit comments