@@ -8,6 +8,7 @@ use rustc_middle::ty::adjustment::PointerCast;
8
8
use rustc_middle:: ty:: layout:: { IntegerExt , LayoutOf , TyAndLayout } ;
9
9
use rustc_middle:: ty:: { self , FloatTy , Ty , TypeAndMut } ;
10
10
use rustc_target:: abi:: { Integer , Variants } ;
11
+ use rustc_type_ir:: sty:: TyKind :: * ;
11
12
12
13
use super :: {
13
14
util:: ensure_monomorphic_enough, FnVal , ImmTy , Immediate , InterpCx , Machine , OpTy , PlaceTy ,
@@ -102,7 +103,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
102
103
src : & ImmTy < ' tcx , M :: PointerTag > ,
103
104
cast_ty : Ty < ' tcx > ,
104
105
) -> InterpResult < ' tcx , Immediate < M :: PointerTag > > {
105
- use rustc_middle :: ty :: TyKind :: * ;
106
+ use rustc_type_ir :: sty :: TyKind :: * ;
106
107
trace ! ( "Casting {:?}: {:?} to {:?}" , * src, src. layout. ty, cast_ty) ;
107
108
108
109
match src. layout . ty . kind ( ) {
@@ -205,7 +206,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
205
206
let v = scalar. to_bits ( src_layout. size ) ?;
206
207
let v = if signed { self . sign_extend ( v, src_layout) } else { v } ;
207
208
trace ! ( "cast_from_scalar: {}, {} -> {}" , v, src_layout. ty, cast_ty) ;
208
- use rustc_middle:: ty:: TyKind :: * ;
209
209
210
210
Ok ( match * cast_ty. kind ( ) {
211
211
Int ( _) | Uint ( _) => {
@@ -247,7 +247,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
247
247
where
248
248
F : Float + Into < Scalar < M :: PointerTag > > + FloatConvert < Single > + FloatConvert < Double > ,
249
249
{
250
- use rustc_middle :: ty :: TyKind :: * ;
250
+ use rustc_type_ir :: sty :: TyKind :: * ;
251
251
match * dest_ty. kind ( ) {
252
252
// float -> uint
253
253
Uint ( t) => {
0 commit comments