@@ -1946,18 +1946,18 @@ fn detect_extreme_expr<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_
19461946 let which = match ( & ty. kind , cv) {
19471947 ( & ty:: Bool , Constant :: Bool ( false ) ) | ( & ty:: Uint ( _) , Constant :: Int ( 0 ) ) => Minimum ,
19481948 ( & ty:: Int ( ity) , Constant :: Int ( i) )
1949- if i == unsext ( cx. tcx , i128:: min_value ( ) >> ( 128 - int_bits ( cx. tcx , ity) ) , ity) =>
1949+ if i == unsext ( cx. tcx , i128:: MIN >> ( 128 - int_bits ( cx. tcx , ity) ) , ity) =>
19501950 {
19511951 Minimum
19521952 } ,
19531953
19541954 ( & ty:: Bool , Constant :: Bool ( true ) ) => Maximum ,
19551955 ( & ty:: Int ( ity) , Constant :: Int ( i) )
1956- if i == unsext ( cx. tcx , i128:: max_value ( ) >> ( 128 - int_bits ( cx. tcx , ity) ) , ity) =>
1956+ if i == unsext ( cx. tcx , i128:: MAX >> ( 128 - int_bits ( cx. tcx , ity) ) , ity) =>
19571957 {
19581958 Maximum
19591959 } ,
1960- ( & ty:: Uint ( uty) , Constant :: Int ( i) ) if clip ( cx. tcx , u128:: max_value ( ) , uty) == i => Maximum ,
1960+ ( & ty:: Uint ( uty) , Constant :: Int ( i) ) if clip ( cx. tcx , u128:: MAX , uty) == i => Maximum ,
19611961
19621962 _ => return None ,
19631963 } ;
@@ -2039,7 +2039,7 @@ impl FullInt {
20392039 fn cmp_s_u ( s : i128 , u : u128 ) -> Ordering {
20402040 if s < 0 {
20412041 Ordering :: Less
2042- } else if u > ( i128:: max_value ( ) as u128 ) {
2042+ } else if u > ( i128:: MAX as u128 ) {
20432043 Ordering :: Greater
20442044 } else {
20452045 ( s as u128 ) . cmp ( & u)
@@ -2084,48 +2084,48 @@ fn numeric_cast_precast_bounds<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr<'_>)
20842084 match pre_cast_ty. kind {
20852085 ty:: Int ( int_ty) => Some ( match int_ty {
20862086 IntTy :: I8 => (
2087- FullInt :: S ( i128:: from ( i8:: min_value ( ) ) ) ,
2088- FullInt :: S ( i128:: from ( i8:: max_value ( ) ) ) ,
2087+ FullInt :: S ( i128:: from ( i8:: MIN ) ) ,
2088+ FullInt :: S ( i128:: from ( i8:: MAX ) ) ,
20892089 ) ,
20902090 IntTy :: I16 => (
2091- FullInt :: S ( i128:: from ( i16:: min_value ( ) ) ) ,
2092- FullInt :: S ( i128:: from ( i16:: max_value ( ) ) ) ,
2091+ FullInt :: S ( i128:: from ( i16:: MIN ) ) ,
2092+ FullInt :: S ( i128:: from ( i16:: MAX ) ) ,
20932093 ) ,
20942094 IntTy :: I32 => (
2095- FullInt :: S ( i128:: from ( i32:: min_value ( ) ) ) ,
2096- FullInt :: S ( i128:: from ( i32:: max_value ( ) ) ) ,
2095+ FullInt :: S ( i128:: from ( i32:: MIN ) ) ,
2096+ FullInt :: S ( i128:: from ( i32:: MAX ) ) ,
20972097 ) ,
20982098 IntTy :: I64 => (
2099- FullInt :: S ( i128:: from ( i64:: min_value ( ) ) ) ,
2100- FullInt :: S ( i128:: from ( i64:: max_value ( ) ) ) ,
2099+ FullInt :: S ( i128:: from ( i64:: MIN ) ) ,
2100+ FullInt :: S ( i128:: from ( i64:: MAX ) ) ,
21012101 ) ,
2102- IntTy :: I128 => ( FullInt :: S ( i128:: min_value ( ) ) , FullInt :: S ( i128:: max_value ( ) ) ) ,
2102+ IntTy :: I128 => ( FullInt :: S ( i128:: MIN ) , FullInt :: S ( i128:: MAX ) ) ,
21032103 IntTy :: Isize => (
2104- FullInt :: S ( isize:: min_value ( ) as i128 ) ,
2105- FullInt :: S ( isize:: max_value ( ) as i128 ) ,
2104+ FullInt :: S ( isize:: MIN as i128 ) ,
2105+ FullInt :: S ( isize:: MAX as i128 ) ,
21062106 ) ,
21072107 } ) ,
21082108 ty:: Uint ( uint_ty) => Some ( match uint_ty {
21092109 UintTy :: U8 => (
2110- FullInt :: U ( u128:: from ( u8:: min_value ( ) ) ) ,
2111- FullInt :: U ( u128:: from ( u8:: max_value ( ) ) ) ,
2110+ FullInt :: U ( u128:: from ( u8:: MIN ) ) ,
2111+ FullInt :: U ( u128:: from ( u8:: MAX ) ) ,
21122112 ) ,
21132113 UintTy :: U16 => (
2114- FullInt :: U ( u128:: from ( u16:: min_value ( ) ) ) ,
2115- FullInt :: U ( u128:: from ( u16:: max_value ( ) ) ) ,
2114+ FullInt :: U ( u128:: from ( u16:: MIN ) ) ,
2115+ FullInt :: U ( u128:: from ( u16:: MAX ) ) ,
21162116 ) ,
21172117 UintTy :: U32 => (
2118- FullInt :: U ( u128:: from ( u32:: min_value ( ) ) ) ,
2119- FullInt :: U ( u128:: from ( u32:: max_value ( ) ) ) ,
2118+ FullInt :: U ( u128:: from ( u32:: MIN ) ) ,
2119+ FullInt :: U ( u128:: from ( u32:: MAX ) ) ,
21202120 ) ,
21212121 UintTy :: U64 => (
2122- FullInt :: U ( u128:: from ( u64:: min_value ( ) ) ) ,
2123- FullInt :: U ( u128:: from ( u64:: max_value ( ) ) ) ,
2122+ FullInt :: U ( u128:: from ( u64:: MIN ) ) ,
2123+ FullInt :: U ( u128:: from ( u64:: MAX ) ) ,
21242124 ) ,
2125- UintTy :: U128 => ( FullInt :: U ( u128:: min_value ( ) ) , FullInt :: U ( u128:: max_value ( ) ) ) ,
2125+ UintTy :: U128 => ( FullInt :: U ( u128:: MIN ) , FullInt :: U ( u128:: MAX ) ) ,
21262126 UintTy :: Usize => (
2127- FullInt :: U ( usize:: min_value ( ) as u128 ) ,
2128- FullInt :: U ( usize:: max_value ( ) as u128 ) ,
2127+ FullInt :: U ( usize:: MIN as u128 ) ,
2128+ FullInt :: U ( usize:: MAX as u128 ) ,
21292129 ) ,
21302130 } ) ,
21312131 _ => None ,
0 commit comments