@@ -101,7 +101,6 @@ nonzero_integers! {
101
101
NonZeroU16 ( u16 ) ;
102
102
NonZeroU32 ( u32 ) ;
103
103
NonZeroU64 ( u64 ) ;
104
- NonZeroU128 ( u128 ) ;
105
104
NonZeroUsize ( usize ) ;
106
105
}
107
106
@@ -114,7 +113,6 @@ nonzero_integers! {
114
113
NonZeroI16 ( i16 ) ;
115
114
NonZeroI32 ( i32 ) ;
116
115
NonZeroI64 ( i64 ) ;
117
- NonZeroI128 ( i128 ) ;
118
116
NonZeroIsize ( isize ) ;
119
117
}
120
118
@@ -1940,12 +1938,6 @@ impl i64 {
1940
1938
int_impl ! { i64 , i64 , u64 , 64 , -9223372036854775808 , 9223372036854775807 , "" , "" }
1941
1939
}
1942
1940
1943
- #[ lang = "i128" ]
1944
- impl i128 {
1945
- int_impl ! { i128 , i128 , u128 , 128 , -170141183460469231731687303715884105728 ,
1946
- 170141183460469231731687303715884105727 , "" , "" }
1947
- }
1948
-
1949
1941
#[ cfg( target_pointer_width = "16" ) ]
1950
1942
#[ lang = "isize" ]
1951
1943
impl isize {
@@ -4030,11 +4022,6 @@ impl u64 {
4030
4022
uint_impl ! { u64 , u64 , 64 , 18446744073709551615 , "" , "" }
4031
4023
}
4032
4024
4033
- #[ lang = "u128" ]
4034
- impl u128 {
4035
- uint_impl ! { u128 , u128 , 128 , 340282366920938463463374607431768211455 , "" , "" }
4036
- }
4037
-
4038
4025
#[ cfg( target_pointer_width = "16" ) ]
4039
4026
#[ lang = "usize" ]
4040
4027
impl usize {
@@ -4168,7 +4155,7 @@ macro_rules! from_str_radix_int_impl {
4168
4155
}
4169
4156
) * }
4170
4157
}
4171
- from_str_radix_int_impl ! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
4158
+ from_str_radix_int_impl ! { isize i8 i16 i32 i64 usize u8 u16 u32 u64 }
4172
4159
4173
4160
/// The error type returned when a checked integral type conversion fails.
4174
4161
#[ unstable( feature = "try_from" , issue = "33417" ) ]
@@ -4269,30 +4256,25 @@ macro_rules! rev {
4269
4256
try_from_upper_bounded ! ( u16 , u8 ) ;
4270
4257
try_from_upper_bounded ! ( u32 , u16 , u8 ) ;
4271
4258
try_from_upper_bounded ! ( u64 , u32 , u16 , u8 ) ;
4272
- try_from_upper_bounded ! ( u128 , u64 , u32 , u16 , u8 ) ;
4273
4259
4274
4260
try_from_both_bounded ! ( i16 , i8 ) ;
4275
4261
try_from_both_bounded ! ( i32 , i16 , i8 ) ;
4276
4262
try_from_both_bounded ! ( i64 , i32 , i16 , i8 ) ;
4277
- try_from_both_bounded ! ( i128 , i64 , i32 , i16 , i8 ) ;
4278
4263
4279
4264
// unsigned-to-signed
4280
4265
try_from_upper_bounded ! ( u8 , i8 ) ;
4281
4266
try_from_upper_bounded ! ( u16 , i8 , i16 ) ;
4282
4267
try_from_upper_bounded ! ( u32 , i8 , i16 , i32 ) ;
4283
4268
try_from_upper_bounded ! ( u64 , i8 , i16 , i32 , i64 ) ;
4284
- try_from_upper_bounded ! ( u128 , i8 , i16 , i32 , i64 , i128 ) ;
4285
4269
4286
4270
// signed-to-unsigned
4287
- try_from_lower_bounded ! ( i8 , u8 , u16 , u32 , u64 , u128 ) ;
4288
- try_from_lower_bounded ! ( i16 , u16 , u32 , u64 , u128 ) ;
4289
- try_from_lower_bounded ! ( i32 , u32 , u64 , u128 ) ;
4290
- try_from_lower_bounded ! ( i64 , u64 , u128 ) ;
4291
- try_from_lower_bounded ! ( i128 , u128 ) ;
4271
+ try_from_lower_bounded ! ( i8 , u8 , u16 , u32 , u64 ) ;
4272
+ try_from_lower_bounded ! ( i16 , u16 , u32 , u64 ) ;
4273
+ try_from_lower_bounded ! ( i32 , u32 , u64 ) ;
4274
+ try_from_lower_bounded ! ( i64 , u64 ) ;
4292
4275
try_from_both_bounded ! ( i16 , u8 ) ;
4293
4276
try_from_both_bounded ! ( i32 , u16 , u8 ) ;
4294
4277
try_from_both_bounded ! ( i64 , u32 , u16 , u8 ) ;
4295
- try_from_both_bounded ! ( i128 , u64 , u32 , u16 , u8 ) ;
4296
4278
4297
4279
// usize/isize
4298
4280
try_from_upper_bounded ! ( usize , isize ) ;
@@ -4309,9 +4291,9 @@ mod ptr_try_from_impls {
4309
4291
use convert:: TryFrom ;
4310
4292
4311
4293
// Fallible across platfoms, only implementation differs
4312
- try_from_lower_bounded ! ( isize , u16 , u32 , u64 , u128 ) ;
4294
+ try_from_lower_bounded ! ( isize , u16 , u32 , u64 ) ;
4313
4295
rev ! ( try_from_lower_bounded, usize , i8 , i16 ) ;
4314
- rev ! ( try_from_both_bounded, usize , i32 , i64 , i128 ) ;
4296
+ rev ! ( try_from_both_bounded, usize , i32 , i64 ) ;
4315
4297
}
4316
4298
4317
4299
#[ cfg( target_pointer_width = "32" ) ]
@@ -4321,9 +4303,9 @@ mod ptr_try_from_impls {
4321
4303
4322
4304
// Fallible across platfoms, only implementation differs
4323
4305
try_from_both_bounded ! ( isize , u16 ) ;
4324
- try_from_lower_bounded ! ( isize , u32 , u64 , u128 ) ;
4306
+ try_from_lower_bounded ! ( isize , u32 , u64 ) ;
4325
4307
rev ! ( try_from_lower_bounded, usize , i8 , i16 , i32 ) ;
4326
- rev ! ( try_from_both_bounded, usize , i64 , i128 ) ;
4308
+ rev ! ( try_from_both_bounded, usize , i64 ) ;
4327
4309
}
4328
4310
4329
4311
#[ cfg( target_pointer_width = "64" ) ]
@@ -4333,9 +4315,8 @@ mod ptr_try_from_impls {
4333
4315
4334
4316
// Fallible across platfoms, only implementation differs
4335
4317
try_from_both_bounded ! ( isize , u16 , u32 ) ;
4336
- try_from_lower_bounded ! ( isize , u64 , u128 ) ;
4318
+ try_from_lower_bounded ! ( isize , u64 ) ;
4337
4319
rev ! ( try_from_lower_bounded, usize , i8 , i16 , i32 , i64 ) ;
4338
- rev ! ( try_from_both_bounded, usize , i128 ) ;
4339
4320
}
4340
4321
4341
4322
#[ doc( hidden) ]
@@ -4370,7 +4351,7 @@ macro_rules! doit {
4370
4351
}
4371
4352
} ) * )
4372
4353
}
4373
- doit ! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }
4354
+ doit ! { i8 i16 i32 isize u8 u16 u32 usize }
4374
4355
4375
4356
fn from_str_radix < T : FromStrRadixHelper > ( src : & str , radix : u32 ) -> Result < T , ParseIntError > {
4376
4357
use self :: IntErrorKind :: * ;
@@ -4511,39 +4492,27 @@ macro_rules! impl_from {
4511
4492
impl_from ! { u8 , u16 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4512
4493
impl_from ! { u8 , u32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4513
4494
impl_from ! { u8 , u64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4514
- impl_from ! { u8 , u128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4515
4495
impl_from ! { u8 , usize , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4516
4496
impl_from ! { u16 , u32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4517
4497
impl_from ! { u16 , u64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4518
- impl_from ! { u16 , u128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4519
4498
impl_from ! { u32 , u64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4520
- impl_from ! { u32 , u128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4521
- impl_from ! { u64 , u128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4522
4499
4523
4500
// Signed -> Signed
4524
4501
impl_from ! { i8 , i16 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4525
4502
impl_from ! { i8 , i32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4526
4503
impl_from ! { i8 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4527
- impl_from ! { i8 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4528
4504
impl_from ! { i8 , isize , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4529
4505
impl_from ! { i16 , i32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4530
4506
impl_from ! { i16 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4531
- impl_from ! { i16 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4532
4507
impl_from ! { i32 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4533
- impl_from ! { i32 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4534
- impl_from ! { i64 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4535
4508
4536
4509
// Unsigned -> Signed
4537
4510
impl_from ! { u8 , i16 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4538
4511
impl_from ! { u8 , i32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4539
4512
impl_from ! { u8 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4540
- impl_from ! { u8 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4541
4513
impl_from ! { u16 , i32 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4542
4514
impl_from ! { u16 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4543
- impl_from ! { u16 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4544
4515
impl_from ! { u32 , i64 , #[ stable( feature = "lossless_int_conv" , since = "1.5.0" ) ] }
4545
- impl_from ! { u32 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4546
- impl_from ! { u64 , i128 , #[ stable( feature = "i128" , since = "1.26.0" ) ] }
4547
4516
4548
4517
// The C99 standard defines bounds on INTPTR_MIN, INTPTR_MAX, and UINTPTR_MAX
4549
4518
// which imply that pointer-sized integers must be at least 16 bits:
@@ -4558,7 +4527,6 @@ impl_from! { i16, isize, #[stable(feature = "lossless_iusize_conv", since = "1.2
4558
4527
// https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/20171017a-cheri-poster.pdf
4559
4528
// http://www.csl.sri.com/users/neumann/2012resolve-cheri.pdf
4560
4529
4561
-
4562
4530
// Note: integers can only be represented with full precision in a float if
4563
4531
// they fit in the significand, which is 24 bits in f32 and 53 bits in f64.
4564
4532
// Lossy float conversions are not implemented at this time.
0 commit comments