@@ -561,15 +561,15 @@ declare_lint! {
561
561
fn int_ty_to_nbits ( typ : Ty , tcx : TyCtxt ) -> u64 {
562
562
match typ. sty {
563
563
ty:: TyInt ( i) => match i {
564
- IntTy :: Is => tcx. data_layout . pointer_size . bits ( ) ,
564
+ IntTy :: Isize => tcx. data_layout . pointer_size . bits ( ) ,
565
565
IntTy :: I8 => 8 ,
566
566
IntTy :: I16 => 16 ,
567
567
IntTy :: I32 => 32 ,
568
568
IntTy :: I64 => 64 ,
569
569
IntTy :: I128 => 128 ,
570
570
} ,
571
571
ty:: TyUint ( i) => match i {
572
- UintTy :: Us => tcx. data_layout . pointer_size . bits ( ) ,
572
+ UintTy :: Usize => tcx. data_layout . pointer_size . bits ( ) ,
573
573
UintTy :: U8 => 8 ,
574
574
UintTy :: U16 => 16 ,
575
575
UintTy :: U32 => 32 ,
@@ -582,7 +582,7 @@ fn int_ty_to_nbits(typ: Ty, tcx: TyCtxt) -> u64 {
582
582
583
583
fn is_isize_or_usize ( typ : Ty ) -> bool {
584
584
match typ. sty {
585
- ty:: TyInt ( IntTy :: Is ) | ty:: TyUint ( UintTy :: Us ) => true ,
585
+ ty:: TyInt ( IntTy :: Isize ) | ty:: TyUint ( UintTy :: Usize ) => true ,
586
586
_ => false ,
587
587
}
588
588
}
@@ -1177,31 +1177,31 @@ fn detect_extreme_expr<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) -
1177
1177
1178
1178
let which = match ( & ty. sty , cv. val ) {
1179
1179
( & ty:: TyBool , Bool ( false ) ) |
1180
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is32 ( :: std:: i32:: MIN ) ) ) ) |
1181
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is64 ( :: std:: i64:: MIN ) ) ) ) |
1180
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is32 ( :: std:: i32:: MIN ) ) ) ) |
1181
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is64 ( :: std:: i64:: MIN ) ) ) ) |
1182
1182
( & ty:: TyInt ( IntTy :: I8 ) , Integral ( I8 ( :: std:: i8:: MIN ) ) ) |
1183
1183
( & ty:: TyInt ( IntTy :: I16 ) , Integral ( I16 ( :: std:: i16:: MIN ) ) ) |
1184
1184
( & ty:: TyInt ( IntTy :: I32 ) , Integral ( I32 ( :: std:: i32:: MIN ) ) ) |
1185
1185
( & ty:: TyInt ( IntTy :: I64 ) , Integral ( I64 ( :: std:: i64:: MIN ) ) ) |
1186
1186
( & ty:: TyInt ( IntTy :: I128 ) , Integral ( I128 ( :: std:: i128:: MIN ) ) ) |
1187
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us32 ( :: std:: u32:: MIN ) ) ) ) |
1188
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us64 ( :: std:: u64:: MIN ) ) ) ) |
1187
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us32 ( :: std:: u32:: MIN ) ) ) ) |
1188
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us64 ( :: std:: u64:: MIN ) ) ) ) |
1189
1189
( & ty:: TyUint ( UintTy :: U8 ) , Integral ( U8 ( :: std:: u8:: MIN ) ) ) |
1190
1190
( & ty:: TyUint ( UintTy :: U16 ) , Integral ( U16 ( :: std:: u16:: MIN ) ) ) |
1191
1191
( & ty:: TyUint ( UintTy :: U32 ) , Integral ( U32 ( :: std:: u32:: MIN ) ) ) |
1192
1192
( & ty:: TyUint ( UintTy :: U64 ) , Integral ( U64 ( :: std:: u64:: MIN ) ) ) |
1193
1193
( & ty:: TyUint ( UintTy :: U128 ) , Integral ( U128 ( :: std:: u128:: MIN ) ) ) => Minimum ,
1194
1194
1195
1195
( & ty:: TyBool , Bool ( true ) ) |
1196
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is32 ( :: std:: i32:: MAX ) ) ) ) |
1197
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is64 ( :: std:: i64:: MAX ) ) ) ) |
1196
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is32 ( :: std:: i32:: MAX ) ) ) ) |
1197
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is64 ( :: std:: i64:: MAX ) ) ) ) |
1198
1198
( & ty:: TyInt ( IntTy :: I8 ) , Integral ( I8 ( :: std:: i8:: MAX ) ) ) |
1199
1199
( & ty:: TyInt ( IntTy :: I16 ) , Integral ( I16 ( :: std:: i16:: MAX ) ) ) |
1200
1200
( & ty:: TyInt ( IntTy :: I32 ) , Integral ( I32 ( :: std:: i32:: MAX ) ) ) |
1201
1201
( & ty:: TyInt ( IntTy :: I64 ) , Integral ( I64 ( :: std:: i64:: MAX ) ) ) |
1202
1202
( & ty:: TyInt ( IntTy :: I128 ) , Integral ( I128 ( :: std:: i128:: MAX ) ) ) |
1203
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us32 ( :: std:: u32:: MAX ) ) ) ) |
1204
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us64 ( :: std:: u64:: MAX ) ) ) ) |
1203
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us32 ( :: std:: u32:: MAX ) ) ) ) |
1204
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us64 ( :: std:: u64:: MAX ) ) ) ) |
1205
1205
( & ty:: TyUint ( UintTy :: U8 ) , Integral ( U8 ( :: std:: u8:: MAX ) ) ) |
1206
1206
( & ty:: TyUint ( UintTy :: U16 ) , Integral ( U16 ( :: std:: u16:: MAX ) ) ) |
1207
1207
( & ty:: TyUint ( UintTy :: U32 ) , Integral ( U32 ( :: std:: u32:: MAX ) ) ) |
@@ -1355,7 +1355,7 @@ fn numeric_cast_precast_bounds<'a>(cx: &LateContext, expr: &'a Expr) -> Option<(
1355
1355
FullInt :: S ( i128:: from ( i64:: max_value ( ) ) ) ,
1356
1356
) ,
1357
1357
IntTy :: I128 => ( FullInt :: S ( i128:: min_value ( ) as i128 ) , FullInt :: S ( i128:: max_value ( ) as i128 ) ) ,
1358
- IntTy :: Is => ( FullInt :: S ( isize:: min_value ( ) as i128 ) , FullInt :: S ( isize:: max_value ( ) as i128 ) ) ,
1358
+ IntTy :: Isize => ( FullInt :: S ( isize:: min_value ( ) as i128 ) , FullInt :: S ( isize:: max_value ( ) as i128 ) ) ,
1359
1359
} ) ,
1360
1360
ty:: TyUint ( uint_ty) => Some ( match uint_ty {
1361
1361
UintTy :: U8 => ( FullInt :: U ( u128:: from ( u8:: min_value ( ) ) ) , FullInt :: U ( u128:: from ( u8:: max_value ( ) ) ) ) ,
@@ -1372,7 +1372,7 @@ fn numeric_cast_precast_bounds<'a>(cx: &LateContext, expr: &'a Expr) -> Option<(
1372
1372
FullInt :: U ( u128:: from ( u64:: max_value ( ) ) ) ,
1373
1373
) ,
1374
1374
UintTy :: U128 => ( FullInt :: U ( u128:: min_value ( ) as u128 ) , FullInt :: U ( u128:: max_value ( ) as u128 ) ) ,
1375
- UintTy :: Us => ( FullInt :: U ( usize:: min_value ( ) as u128 ) , FullInt :: U ( usize:: max_value ( ) as u128 ) ) ,
1375
+ UintTy :: Usize => ( FullInt :: U ( usize:: min_value ( ) as u128 ) , FullInt :: U ( usize:: max_value ( ) as u128 ) ) ,
1376
1376
} ) ,
1377
1377
_ => None ,
1378
1378
}
0 commit comments