@@ -5257,13 +5257,9 @@ macro_rules! nzint_impl_from {
52575257 #[ $attr]
52585258 #[ doc = $doc]
52595259 impl From <$Small> for $Large {
5260- /// Widens a non-zero integer without checking the value is zero.
5261- ///
5262- /// # Safety
5263- ///
5264- /// The value is assumed to be non-zero.
52655260 #[ inline]
52665261 fn from( small: $Small) -> $Large {
5262+ // SAFETY: input type guarantees the value is non-zero
52675263 unsafe {
52685264 <$Large>:: new_unchecked( small. get( ) . into( ) )
52695265 }
@@ -5283,40 +5279,40 @@ macro_rules! nzint_impl_from {
52835279}
52845280
52855281// Non-zero Unsigned -> Non-zero Unsigned
5286- nzint_impl_from ! { NonZeroU8 , NonZeroU16 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5287- nzint_impl_from ! { NonZeroU8 , NonZeroU32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5288- nzint_impl_from ! { NonZeroU8 , NonZeroU64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5289- nzint_impl_from ! { NonZeroU8 , NonZeroU128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5290- nzint_impl_from ! { NonZeroU8 , NonZeroUsize , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5291- nzint_impl_from ! { NonZeroU16 , NonZeroU32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5292- nzint_impl_from ! { NonZeroU16 , NonZeroU64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5293- nzint_impl_from ! { NonZeroU16 , NonZeroU128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5294- nzint_impl_from ! { NonZeroU32 , NonZeroU64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5295- nzint_impl_from ! { NonZeroU32 , NonZeroU128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5296- nzint_impl_from ! { NonZeroU64 , NonZeroU128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5282+ nzint_impl_from ! { NonZeroU8 , NonZeroU16 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5283+ nzint_impl_from ! { NonZeroU8 , NonZeroU32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5284+ nzint_impl_from ! { NonZeroU8 , NonZeroU64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5285+ nzint_impl_from ! { NonZeroU8 , NonZeroU128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5286+ nzint_impl_from ! { NonZeroU8 , NonZeroUsize , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5287+ nzint_impl_from ! { NonZeroU16 , NonZeroU32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5288+ nzint_impl_from ! { NonZeroU16 , NonZeroU64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5289+ nzint_impl_from ! { NonZeroU16 , NonZeroU128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5290+ nzint_impl_from ! { NonZeroU32 , NonZeroU64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5291+ nzint_impl_from ! { NonZeroU32 , NonZeroU128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5292+ nzint_impl_from ! { NonZeroU64 , NonZeroU128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
52975293
52985294// Non-zero Signed -> Non-zero Signed
5299- nzint_impl_from ! { NonZeroI8 , NonZeroI16 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5300- nzint_impl_from ! { NonZeroI8 , NonZeroI32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5301- nzint_impl_from ! { NonZeroI8 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5302- nzint_impl_from ! { NonZeroI8 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5303- nzint_impl_from ! { NonZeroI8 , NonZeroIsize , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5304- nzint_impl_from ! { NonZeroI16 , NonZeroI32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5305- nzint_impl_from ! { NonZeroI16 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5306- nzint_impl_from ! { NonZeroI16 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5307- nzint_impl_from ! { NonZeroI32 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5308- nzint_impl_from ! { NonZeroI32 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5309- nzint_impl_from ! { NonZeroI64 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5295+ nzint_impl_from ! { NonZeroI8 , NonZeroI16 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5296+ nzint_impl_from ! { NonZeroI8 , NonZeroI32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5297+ nzint_impl_from ! { NonZeroI8 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5298+ nzint_impl_from ! { NonZeroI8 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5299+ nzint_impl_from ! { NonZeroI8 , NonZeroIsize , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5300+ nzint_impl_from ! { NonZeroI16 , NonZeroI32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5301+ nzint_impl_from ! { NonZeroI16 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5302+ nzint_impl_from ! { NonZeroI16 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5303+ nzint_impl_from ! { NonZeroI32 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5304+ nzint_impl_from ! { NonZeroI32 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5305+ nzint_impl_from ! { NonZeroI64 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
53105306
53115307// NonZero UnSigned -> Non-zero Signed
5312- nzint_impl_from ! { NonZeroU8 , NonZeroI16 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5313- nzint_impl_from ! { NonZeroU8 , NonZeroI32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5314- nzint_impl_from ! { NonZeroU8 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5315- nzint_impl_from ! { NonZeroU8 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5316- nzint_impl_from ! { NonZeroU8 , NonZeroIsize , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5317- nzint_impl_from ! { NonZeroU16 , NonZeroI32 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5318- nzint_impl_from ! { NonZeroU16 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5319- nzint_impl_from ! { NonZeroU16 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5320- nzint_impl_from ! { NonZeroU32 , NonZeroI64 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5321- nzint_impl_from ! { NonZeroU32 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5322- nzint_impl_from ! { NonZeroU64 , NonZeroI128 , #[ unstable( feature = "lossless_non_zero_int_conv " , issue = "66196" ) ] }
5308+ nzint_impl_from ! { NonZeroU8 , NonZeroI16 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5309+ nzint_impl_from ! { NonZeroU8 , NonZeroI32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5310+ nzint_impl_from ! { NonZeroU8 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5311+ nzint_impl_from ! { NonZeroU8 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5312+ nzint_impl_from ! { NonZeroU8 , NonZeroIsize , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5313+ nzint_impl_from ! { NonZeroU16 , NonZeroI32 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5314+ nzint_impl_from ! { NonZeroU16 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5315+ nzint_impl_from ! { NonZeroU16 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5316+ nzint_impl_from ! { NonZeroU32 , NonZeroI64 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5317+ nzint_impl_from ! { NonZeroU32 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
5318+ nzint_impl_from ! { NonZeroU64 , NonZeroI128 , #[ unstable( feature = "nz_int_conv " , issue = "66196" ) ] }
0 commit comments