@@ -2,9 +2,7 @@ use std::iter;
22
33use log:: trace;
44
5- use rustc_attr as attr;
6- use rustc_ast:: ast:: FloatTy ;
7- use rustc_middle:: { mir, mir:: BinOp , ty} ;
5+ use rustc_middle:: { mir, mir:: BinOp , ty, ty:: FloatTy } ;
86use rustc_middle:: ty:: layout:: IntegerExt ;
97use rustc_apfloat:: { Float , Round } ;
108use rustc_target:: abi:: { Align , Integer , LayoutOf } ;
@@ -578,7 +576,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
578576 Ok ( match dest_ty. kind ( ) {
579577 // Unsigned
580578 ty:: Uint ( t) => {
581- let size = Integer :: from_attr ( this, attr :: IntType :: UnsignedInt ( * t ) ) . size ( ) ;
579+ let size = Integer :: from_uint_ty ( this, * t ) . size ( ) ;
582580 let res = f. to_u128 ( size. bits_usize ( ) ) ;
583581 if res. status . is_empty ( ) {
584582 // No status flags means there was no further rounding or other loss of precision.
@@ -593,7 +591,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
593591 }
594592 // Signed
595593 ty:: Int ( t) => {
596- let size = Integer :: from_attr ( this, attr :: IntType :: SignedInt ( * t ) ) . size ( ) ;
594+ let size = Integer :: from_int_ty ( this, * t ) . size ( ) ;
597595 let res = f. to_i128 ( size. bits_usize ( ) ) ;
598596 if res. status . is_empty ( ) {
599597 // No status flags means there was no further rounding or other loss of precision.
0 commit comments