@@ -2,9 +2,7 @@ use std::iter;
2
2
3
3
use log:: trace;
4
4
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 } ;
8
6
use rustc_middle:: ty:: layout:: IntegerExt ;
9
7
use rustc_apfloat:: { Float , Round } ;
10
8
use rustc_target:: abi:: { Align , Integer , LayoutOf } ;
@@ -578,7 +576,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
578
576
Ok ( match dest_ty. kind ( ) {
579
577
// Unsigned
580
578
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 ( ) ;
582
580
let res = f. to_u128 ( size. bits_usize ( ) ) ;
583
581
if res. status . is_empty ( ) {
584
582
// 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
593
591
}
594
592
// Signed
595
593
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 ( ) ;
597
595
let res = f. to_i128 ( size. bits_usize ( ) ) ;
598
596
if res. status . is_empty ( ) {
599
597
// No status flags means there was no further rounding or other loss of precision.
0 commit comments