@@ -59,6 +59,8 @@ pub use dec2flt::ParseFloatError;
59
59
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
60
60
pub use error:: ParseIntError ;
61
61
62
+ pub ( crate ) use nonzero:: NonZero ;
63
+
62
64
#[ stable( feature = "nonzero" , since = "1.28.0" ) ]
63
65
pub use nonzero:: { NonZeroU128 , NonZeroU16 , NonZeroU32 , NonZeroU64 , NonZeroU8 , NonZeroUsize } ;
64
66
@@ -482,7 +484,7 @@ impl u8 {
482
484
Self = u8 ,
483
485
ActualT = u8 ,
484
486
SignedT = i8 ,
485
- NonZeroT = NonZeroU8 ,
487
+ NonZeroT = NonZero < u8 > ,
486
488
BITS = 8 ,
487
489
MAX = 255 ,
488
490
rot = 2 ,
@@ -791,7 +793,7 @@ impl u8 {
791
793
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
792
794
#[ inline]
793
795
pub const fn is_ascii_alphanumeric ( & self ) -> bool {
794
- matches ! ( * self , b'0' ..=b'9' ) | matches ! ( * self , b'A' ..=b'Z' ) | matches ! ( * self , b'a' ..=b'z' )
796
+ matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'Z' | b'a' ..=b'z' )
795
797
}
796
798
797
799
/// Checks if the value is an ASCII decimal digit:
@@ -1097,7 +1099,7 @@ impl u16 {
1097
1099
Self = u16 ,
1098
1100
ActualT = u16 ,
1099
1101
SignedT = i16 ,
1100
- NonZeroT = NonZeroU16 ,
1102
+ NonZeroT = NonZero < u16 > ,
1101
1103
BITS = 16 ,
1102
1104
MAX = 65535 ,
1103
1105
rot = 4 ,
@@ -1146,7 +1148,7 @@ impl u32 {
1146
1148
Self = u32 ,
1147
1149
ActualT = u32 ,
1148
1150
SignedT = i32 ,
1149
- NonZeroT = NonZeroU32 ,
1151
+ NonZeroT = NonZero < u32 > ,
1150
1152
BITS = 32 ,
1151
1153
MAX = 4294967295 ,
1152
1154
rot = 8 ,
@@ -1170,7 +1172,7 @@ impl u64 {
1170
1172
Self = u64 ,
1171
1173
ActualT = u64 ,
1172
1174
SignedT = i64 ,
1173
- NonZeroT = NonZeroU64 ,
1175
+ NonZeroT = NonZero < u64 > ,
1174
1176
BITS = 64 ,
1175
1177
MAX = 18446744073709551615 ,
1176
1178
rot = 12 ,
@@ -1194,7 +1196,7 @@ impl u128 {
1194
1196
Self = u128 ,
1195
1197
ActualT = u128 ,
1196
1198
SignedT = i128 ,
1197
- NonZeroT = NonZeroU128 ,
1199
+ NonZeroT = NonZero < u128 > ,
1198
1200
BITS = 128 ,
1199
1201
MAX = 340282366920938463463374607431768211455 ,
1200
1202
rot = 16 ,
@@ -1204,9 +1206,9 @@ impl u128 {
1204
1206
swapped = "0x12907856341290785634129078563412" ,
1205
1207
reversed = "0x48091e6a2c48091e6a2c48091e6a2c48" ,
1206
1208
le_bytes = "[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
1207
- 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
1209
+ 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
1208
1210
be_bytes = "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
1209
- 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
1211
+ 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
1210
1212
to_xe_bytes_doc = "" ,
1211
1213
from_xe_bytes_doc = "" ,
1212
1214
bound_condition = "" ,
@@ -1220,7 +1222,7 @@ impl usize {
1220
1222
Self = usize ,
1221
1223
ActualT = u16 ,
1222
1224
SignedT = isize ,
1223
- NonZeroT = NonZeroUsize ,
1225
+ NonZeroT = NonZero < usize > ,
1224
1226
BITS = 16 ,
1225
1227
MAX = 65535 ,
1226
1228
rot = 4 ,
@@ -1245,7 +1247,7 @@ impl usize {
1245
1247
Self = usize ,
1246
1248
ActualT = u32 ,
1247
1249
SignedT = isize ,
1248
- NonZeroT = NonZeroUsize ,
1250
+ NonZeroT = NonZero < usize > ,
1249
1251
BITS = 32 ,
1250
1252
MAX = 4294967295 ,
1251
1253
rot = 8 ,
@@ -1270,7 +1272,7 @@ impl usize {
1270
1272
Self = usize ,
1271
1273
ActualT = u64 ,
1272
1274
SignedT = isize ,
1273
- NonZeroT = NonZeroUsize ,
1275
+ NonZeroT = NonZero < usize > ,
1274
1276
BITS = 64 ,
1275
1277
MAX = 18446744073709551615 ,
1276
1278
rot = 12 ,
0 commit comments