@@ -541,15 +541,15 @@ declare_lint! {
541
541
fn int_ty_to_nbits ( typ : Ty , tcx : TyCtxt ) -> u64 {
542
542
match typ. sty {
543
543
ty:: TyInt ( i) => match i {
544
- IntTy :: Is => tcx. data_layout . pointer_size . bits ( ) ,
544
+ IntTy :: Isize => tcx. data_layout . pointer_size . bits ( ) ,
545
545
IntTy :: I8 => 8 ,
546
546
IntTy :: I16 => 16 ,
547
547
IntTy :: I32 => 32 ,
548
548
IntTy :: I64 => 64 ,
549
549
IntTy :: I128 => 128 ,
550
550
} ,
551
551
ty:: TyUint ( i) => match i {
552
- UintTy :: Us => tcx. data_layout . pointer_size . bits ( ) ,
552
+ UintTy :: Usize => tcx. data_layout . pointer_size . bits ( ) ,
553
553
UintTy :: U8 => 8 ,
554
554
UintTy :: U16 => 16 ,
555
555
UintTy :: U32 => 32 ,
@@ -562,7 +562,7 @@ fn int_ty_to_nbits(typ: Ty, tcx: TyCtxt) -> u64 {
562
562
563
563
fn is_isize_or_usize ( typ : Ty ) -> bool {
564
564
match typ. sty {
565
- ty:: TyInt ( IntTy :: Is ) | ty:: TyUint ( UintTy :: Us ) => true ,
565
+ ty:: TyInt ( IntTy :: Isize ) | ty:: TyUint ( UintTy :: Usize ) => true ,
566
566
_ => false ,
567
567
}
568
568
}
@@ -1151,31 +1151,31 @@ fn detect_extreme_expr<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) -
1151
1151
1152
1152
let which = match ( & ty. sty , cv. val ) {
1153
1153
( & ty:: TyBool , Bool ( false ) ) |
1154
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is32 ( :: std:: i32:: MIN ) ) ) ) |
1155
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is64 ( :: std:: i64:: MIN ) ) ) ) |
1154
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is32 ( :: std:: i32:: MIN ) ) ) ) |
1155
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is64 ( :: std:: i64:: MIN ) ) ) ) |
1156
1156
( & ty:: TyInt ( IntTy :: I8 ) , Integral ( I8 ( :: std:: i8:: MIN ) ) ) |
1157
1157
( & ty:: TyInt ( IntTy :: I16 ) , Integral ( I16 ( :: std:: i16:: MIN ) ) ) |
1158
1158
( & ty:: TyInt ( IntTy :: I32 ) , Integral ( I32 ( :: std:: i32:: MIN ) ) ) |
1159
1159
( & ty:: TyInt ( IntTy :: I64 ) , Integral ( I64 ( :: std:: i64:: MIN ) ) ) |
1160
1160
( & ty:: TyInt ( IntTy :: I128 ) , Integral ( I128 ( :: std:: i128:: MIN ) ) ) |
1161
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us32 ( :: std:: u32:: MIN ) ) ) ) |
1162
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us64 ( :: std:: u64:: MIN ) ) ) ) |
1161
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us32 ( :: std:: u32:: MIN ) ) ) ) |
1162
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us64 ( :: std:: u64:: MIN ) ) ) ) |
1163
1163
( & ty:: TyUint ( UintTy :: U8 ) , Integral ( U8 ( :: std:: u8:: MIN ) ) ) |
1164
1164
( & ty:: TyUint ( UintTy :: U16 ) , Integral ( U16 ( :: std:: u16:: MIN ) ) ) |
1165
1165
( & ty:: TyUint ( UintTy :: U32 ) , Integral ( U32 ( :: std:: u32:: MIN ) ) ) |
1166
1166
( & ty:: TyUint ( UintTy :: U64 ) , Integral ( U64 ( :: std:: u64:: MIN ) ) ) |
1167
1167
( & ty:: TyUint ( UintTy :: U128 ) , Integral ( U128 ( :: std:: u128:: MIN ) ) ) => Minimum ,
1168
1168
1169
1169
( & ty:: TyBool , Bool ( true ) ) |
1170
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is32 ( :: std:: i32:: MAX ) ) ) ) |
1171
- ( & ty:: TyInt ( IntTy :: Is ) , Integral ( Isize ( Is64 ( :: std:: i64:: MAX ) ) ) ) |
1170
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is32 ( :: std:: i32:: MAX ) ) ) ) |
1171
+ ( & ty:: TyInt ( IntTy :: Isize ) , Integral ( Isize ( Is64 ( :: std:: i64:: MAX ) ) ) ) |
1172
1172
( & ty:: TyInt ( IntTy :: I8 ) , Integral ( I8 ( :: std:: i8:: MAX ) ) ) |
1173
1173
( & ty:: TyInt ( IntTy :: I16 ) , Integral ( I16 ( :: std:: i16:: MAX ) ) ) |
1174
1174
( & ty:: TyInt ( IntTy :: I32 ) , Integral ( I32 ( :: std:: i32:: MAX ) ) ) |
1175
1175
( & ty:: TyInt ( IntTy :: I64 ) , Integral ( I64 ( :: std:: i64:: MAX ) ) ) |
1176
1176
( & ty:: TyInt ( IntTy :: I128 ) , Integral ( I128 ( :: std:: i128:: MAX ) ) ) |
1177
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us32 ( :: std:: u32:: MAX ) ) ) ) |
1178
- ( & ty:: TyUint ( UintTy :: Us ) , Integral ( Usize ( Us64 ( :: std:: u64:: MAX ) ) ) ) |
1177
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us32 ( :: std:: u32:: MAX ) ) ) ) |
1178
+ ( & ty:: TyUint ( UintTy :: Usize ) , Integral ( Usize ( Us64 ( :: std:: u64:: MAX ) ) ) ) |
1179
1179
( & ty:: TyUint ( UintTy :: U8 ) , Integral ( U8 ( :: std:: u8:: MAX ) ) ) |
1180
1180
( & ty:: TyUint ( UintTy :: U16 ) , Integral ( U16 ( :: std:: u16:: MAX ) ) ) |
1181
1181
( & ty:: TyUint ( UintTy :: U32 ) , Integral ( U32 ( :: std:: u32:: MAX ) ) ) |
@@ -1329,7 +1329,7 @@ fn numeric_cast_precast_bounds<'a>(cx: &LateContext, expr: &'a Expr) -> Option<(
1329
1329
FullInt :: S ( i128:: from ( i64:: max_value ( ) ) ) ,
1330
1330
) ,
1331
1331
IntTy :: I128 => ( FullInt :: S ( i128:: min_value ( ) as i128 ) , FullInt :: S ( i128:: max_value ( ) as i128 ) ) ,
1332
- IntTy :: Is => ( FullInt :: S ( isize:: min_value ( ) as i128 ) , FullInt :: S ( isize:: max_value ( ) as i128 ) ) ,
1332
+ IntTy :: Isize => ( FullInt :: S ( isize:: min_value ( ) as i128 ) , FullInt :: S ( isize:: max_value ( ) as i128 ) ) ,
1333
1333
} ) ,
1334
1334
ty:: TyUint ( uint_ty) => Some ( match uint_ty {
1335
1335
UintTy :: U8 => ( FullInt :: U ( u128:: from ( u8:: min_value ( ) ) ) , FullInt :: U ( u128:: from ( u8:: max_value ( ) ) ) ) ,
@@ -1346,7 +1346,7 @@ fn numeric_cast_precast_bounds<'a>(cx: &LateContext, expr: &'a Expr) -> Option<(
1346
1346
FullInt :: U ( u128:: from ( u64:: max_value ( ) ) ) ,
1347
1347
) ,
1348
1348
UintTy :: U128 => ( FullInt :: U ( u128:: min_value ( ) as u128 ) , FullInt :: U ( u128:: max_value ( ) as u128 ) ) ,
1349
- UintTy :: Us => ( FullInt :: U ( usize:: min_value ( ) as u128 ) , FullInt :: U ( usize:: max_value ( ) as u128 ) ) ,
1349
+ UintTy :: Usize => ( FullInt :: U ( usize:: min_value ( ) as u128 ) , FullInt :: U ( usize:: max_value ( ) as u128 ) ) ,
1350
1350
} ) ,
1351
1351
_ => None ,
1352
1352
}
0 commit comments