@@ -196,25 +196,25 @@ macro_rules! widening_impl {
196
196
197
197
impl i8 {
198
198
int_impl ! { i8 , i8 , u8 , 8 , 7 , -128 , 127 , 2 , "-0x7e" , "0xa" , "0x12" , "0x12" , "0x48" ,
199
- "[0x12]" , "[0x12]" , "" , "" }
199
+ "[0x12]" , "[0x12]" , "" , "" , "" }
200
200
}
201
201
202
202
impl i16 {
203
203
int_impl ! { i16 , i16 , u16 , 16 , 15 , -32768 , 32767 , 4 , "-0x5ffd" , "0x3a" , "0x1234" , "0x3412" ,
204
- "0x2c48" , "[0x34, 0x12]" , "[0x12, 0x34]" , "" , "" }
204
+ "0x2c48" , "[0x34, 0x12]" , "[0x12, 0x34]" , "" , "" , "" }
205
205
}
206
206
207
207
impl i32 {
208
208
int_impl ! { i32 , i32 , u32 , 32 , 31 , -2147483648 , 2147483647 , 8 , "0x10000b3" , "0xb301" ,
209
209
"0x12345678" , "0x78563412" , "0x1e6a2c48" , "[0x78, 0x56, 0x34, 0x12]" ,
210
- "[0x12, 0x34, 0x56, 0x78]" , "" , "" }
210
+ "[0x12, 0x34, 0x56, 0x78]" , "" , "" , "" }
211
211
}
212
212
213
213
impl i64 {
214
214
int_impl ! { i64 , i64 , u64 , 64 , 63 , -9223372036854775808 , 9223372036854775807 , 12 ,
215
215
"0xaa00000000006e1" , "0x6e10aa" , "0x1234567890123456" , "0x5634129078563412" ,
216
216
"0x6a2c48091e6a2c48" , "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]" ,
217
- "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" , "" , "" }
217
+ "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" , "" , "" , "" }
218
218
}
219
219
220
220
impl i128 {
@@ -225,22 +225,24 @@ impl i128 {
225
225
"[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
226
226
0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
227
227
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
228
- 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "" , "" }
228
+ 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "" , "" , "" }
229
229
}
230
230
231
231
#[ cfg( target_pointer_width = "16" ) ]
232
232
impl isize {
233
233
int_impl ! { isize , i16 , usize , 16 , 15 , -32768 , 32767 , 4 , "-0x5ffd" , "0x3a" , "0x1234" ,
234
234
"0x3412" , "0x2c48" , "[0x34, 0x12]" , "[0x12, 0x34]" ,
235
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
235
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
236
+ " on 16-bit targets" }
236
237
}
237
238
238
239
#[ cfg( target_pointer_width = "32" ) ]
239
240
impl isize {
240
241
int_impl ! { isize , i32 , usize , 32 , 31 , -2147483648 , 2147483647 , 8 , "0x10000b3" , "0xb301" ,
241
242
"0x12345678" , "0x78563412" , "0x1e6a2c48" , "[0x78, 0x56, 0x34, 0x12]" ,
242
243
"[0x12, 0x34, 0x56, 0x78]" ,
243
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
244
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
245
+ " on 32-bit targets" }
244
246
}
245
247
246
248
#[ cfg( target_pointer_width = "64" ) ]
@@ -249,15 +251,16 @@ impl isize {
249
251
12 , "0xaa00000000006e1" , "0x6e10aa" , "0x1234567890123456" , "0x5634129078563412" ,
250
252
"0x6a2c48091e6a2c48" , "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]" ,
251
253
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" ,
252
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
254
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
255
+ " on 64-bit targets" }
253
256
}
254
257
255
258
/// If 6th bit set ascii is upper case.
256
259
const ASCII_CASE_MASK : u8 = 0b0010_0000 ;
257
260
258
261
impl u8 {
259
262
uint_impl ! { u8 , u8 , i8 , NonZeroU8 , 8 , 255 , 2 , "0x82" , "0xa" , "0x12" , "0x12" , "0x48" , "[0x12]" ,
260
- "[0x12]" , "" , "" }
263
+ "[0x12]" , "" , "" , "" }
261
264
widening_impl ! { u8 , u16 , 8 , unsigned }
262
265
263
266
/// Checks if the value is within the ASCII range.
@@ -810,7 +813,7 @@ impl u8 {
810
813
811
814
impl u16 {
812
815
uint_impl ! { u16 , u16 , i16 , NonZeroU16 , 16 , 65535 , 4 , "0xa003" , "0x3a" , "0x1234" , "0x3412" , "0x2c48" ,
813
- "[0x34, 0x12]" , "[0x12, 0x34]" , "" , "" }
816
+ "[0x34, 0x12]" , "[0x12, 0x34]" , "" , "" , "" }
814
817
widening_impl ! { u16 , u32 , 16 , unsigned }
815
818
816
819
/// Checks if the value is a Unicode surrogate code point, which are disallowed values for [`char`].
@@ -841,7 +844,7 @@ impl u16 {
841
844
842
845
impl u32 {
843
846
uint_impl ! { u32 , u32 , i32 , NonZeroU32 , 32 , 4294967295 , 8 , "0x10000b3" , "0xb301" , "0x12345678" ,
844
- "0x78563412" , "0x1e6a2c48" , "[0x78, 0x56, 0x34, 0x12]" , "[0x12, 0x34, 0x56, 0x78]" , "" , "" }
847
+ "0x78563412" , "0x1e6a2c48" , "[0x78, 0x56, 0x34, 0x12]" , "[0x12, 0x34, 0x56, 0x78]" , "" , "" , "" }
845
848
widening_impl ! { u32 , u64 , 32 , unsigned }
846
849
}
847
850
@@ -850,7 +853,7 @@ impl u64 {
850
853
"0x1234567890123456" , "0x5634129078563412" , "0x6a2c48091e6a2c48" ,
851
854
"[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]" ,
852
855
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" ,
853
- "" , "" }
856
+ "" , "" , "" }
854
857
widening_impl ! { u64 , u128 , 64 , unsigned }
855
858
}
856
859
@@ -862,21 +865,23 @@ impl u128 {
862
865
0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
863
866
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
864
867
0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
865
- "" , "" }
868
+ "" , "" , "" }
866
869
}
867
870
868
871
#[ cfg( target_pointer_width = "16" ) ]
869
872
impl usize {
870
873
uint_impl ! { usize , u16 , isize , NonZeroUsize , 16 , 65535 , 4 , "0xa003" , "0x3a" , "0x1234" , "0x3412" , "0x2c48" ,
871
874
"[0x34, 0x12]" , "[0x12, 0x34]" ,
872
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
875
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
876
+ " on 16-bit targets" }
873
877
widening_impl ! { usize , u32 , 16 , unsigned }
874
878
}
875
879
#[ cfg( target_pointer_width = "32" ) ]
876
880
impl usize {
877
881
uint_impl ! { usize , u32 , isize , NonZeroUsize , 32 , 4294967295 , 8 , "0x10000b3" , "0xb301" , "0x12345678" ,
878
882
"0x78563412" , "0x1e6a2c48" , "[0x78, 0x56, 0x34, 0x12]" , "[0x12, 0x34, 0x56, 0x78]" ,
879
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
883
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
884
+ " on 32-bit targets" }
880
885
widening_impl ! { usize , u64 , 32 , unsigned }
881
886
}
882
887
@@ -886,7 +891,8 @@ impl usize {
886
891
"0x1234567890123456" , "0x5634129078563412" , "0x6a2c48091e6a2c48" ,
887
892
"[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]" ,
888
893
"[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]" ,
889
- usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) }
894
+ usize_isize_to_xe_bytes_doc!( ) , usize_isize_from_xe_bytes_doc!( ) ,
895
+ " on 64-bit targets" }
890
896
widening_impl ! { usize , u128 , 64 , unsigned }
891
897
}
892
898
0 commit comments