@@ -439,7 +439,7 @@ impl<'tcx, Tag> Scalar<Tag> {
439439 Ok ( b as u64 )
440440 }
441441
442- pub fn to_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , u64 > {
442+ pub fn to_machine_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , u64 > {
443443 let b = self . to_bits ( cx. data_layout ( ) . pointer_size ) ?;
444444 Ok ( b as u64 )
445445 }
@@ -465,7 +465,7 @@ impl<'tcx, Tag> Scalar<Tag> {
465465 Ok ( b as i64 )
466466 }
467467
468- pub fn to_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , i64 > {
468+ pub fn to_machine_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' static , i64 > {
469469 let sz = cx. data_layout ( ) . pointer_size ;
470470 let b = self . to_bits ( sz) ?;
471471 let b = sign_extend ( b, sz) as i128 ;
@@ -592,8 +592,8 @@ impl<'tcx, Tag> ScalarMaybeUndef<Tag> {
592592 }
593593
594594 #[ inline( always) ]
595- pub fn to_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , u64 > {
596- self . not_undef ( ) ?. to_usize ( cx)
595+ pub fn to_machine_usize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , u64 > {
596+ self . not_undef ( ) ?. to_machine_usize ( cx)
597597 }
598598
599599 #[ inline( always) ]
@@ -612,8 +612,8 @@ impl<'tcx, Tag> ScalarMaybeUndef<Tag> {
612612 }
613613
614614 #[ inline( always) ]
615- pub fn to_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , i64 > {
616- self . not_undef ( ) ?. to_isize ( cx)
615+ pub fn to_machine_isize ( self , cx : & impl HasDataLayout ) -> InterpResult < ' tcx , i64 > {
616+ self . not_undef ( ) ?. to_machine_isize ( cx)
617617 }
618618}
619619
0 commit comments