@@ -430,6 +430,8 @@ macro_rules! nzint_impl_from {
430430 }
431431 }
432432 }
433+
434+ impl_from_ref! { $Small, $Large }
433435 } ;
434436 ( $Small: ty, $Large: ty, #[ $attr: meta] ) => {
435437 nzint_impl_from!( $Small,
@@ -444,31 +446,39 @@ macro_rules! nzint_impl_from {
444446}
445447
446448// Non-zero Unsigned -> Non-zero Unsigned
449+ impl_from_ref ! { NonZeroU8 , NonZeroU8 }
447450nzint_impl_from ! { NonZeroU8 , NonZeroU16 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
448451nzint_impl_from ! { NonZeroU8 , NonZeroU32 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
449452nzint_impl_from ! { NonZeroU8 , NonZeroU64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
450453nzint_impl_from ! { NonZeroU8 , NonZeroU128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
451454nzint_impl_from ! { NonZeroU8 , NonZeroUsize , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
455+ impl_from_ref ! { NonZeroU16 , NonZeroU16 }
452456nzint_impl_from ! { NonZeroU16 , NonZeroU32 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
453457nzint_impl_from ! { NonZeroU16 , NonZeroU64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
454458nzint_impl_from ! { NonZeroU16 , NonZeroU128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
455459nzint_impl_from ! { NonZeroU16 , NonZeroUsize , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
460+ impl_from_ref ! { NonZeroU32 , NonZeroU32 }
456461nzint_impl_from ! { NonZeroU32 , NonZeroU64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
457462nzint_impl_from ! { NonZeroU32 , NonZeroU128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
463+ impl_from_ref ! { NonZeroU64 , NonZeroU64 }
458464nzint_impl_from ! { NonZeroU64 , NonZeroU128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
459465
460466// Non-zero Signed -> Non-zero Signed
467+ impl_from_ref ! { NonZeroI8 , NonZeroI8 }
461468nzint_impl_from ! { NonZeroI8 , NonZeroI16 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
462469nzint_impl_from ! { NonZeroI8 , NonZeroI32 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
463470nzint_impl_from ! { NonZeroI8 , NonZeroI64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
464471nzint_impl_from ! { NonZeroI8 , NonZeroI128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
465472nzint_impl_from ! { NonZeroI8 , NonZeroIsize , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
473+ impl_from_ref ! { NonZeroI16 , NonZeroI16 }
466474nzint_impl_from ! { NonZeroI16 , NonZeroI32 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
467475nzint_impl_from ! { NonZeroI16 , NonZeroI64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
468476nzint_impl_from ! { NonZeroI16 , NonZeroI128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
469477nzint_impl_from ! { NonZeroI16 , NonZeroIsize , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
478+ impl_from_ref ! { NonZeroI32 , NonZeroI32 }
470479nzint_impl_from ! { NonZeroI32 , NonZeroI64 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
471480nzint_impl_from ! { NonZeroI32 , NonZeroI128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
481+ impl_from_ref ! { NonZeroI64 , NonZeroI64 }
472482nzint_impl_from ! { NonZeroI64 , NonZeroI128 , #[ stable( feature = "nz_int_conv" , since = "1.41.0" ) ] }
473483
474484// NonZero UnSigned -> Non-zero Signed
0 commit comments