@@ -282,6 +282,7 @@ macro_rules! int_impl {
282282 /// ```
283283 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
284284 #[ rustc_const_stable( feature = "const_int_conversions" , since = "1.32.0" ) ]
285+ #[ must_use]
285286 #[ inline]
286287 pub const fn from_be( x: Self ) -> Self {
287288 #[ cfg( target_endian = "big" ) ]
@@ -313,6 +314,7 @@ macro_rules! int_impl {
313314 /// ```
314315 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
315316 #[ rustc_const_stable( feature = "const_int_conversions" , since = "1.32.0" ) ]
317+ #[ must_use]
316318 #[ inline]
317319 pub const fn from_le( x: Self ) -> Self {
318320 #[ cfg( target_endian = "little" ) ]
@@ -2620,6 +2622,7 @@ macro_rules! int_impl {
26202622 /// ```
26212623 #[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
26222624 #[ rustc_const_stable( feature = "const_int_conversion" , since = "1.44.0" ) ]
2625+ #[ must_use]
26232626 #[ inline]
26242627 pub const fn from_be_bytes( bytes: [ u8 ; mem:: size_of:: <Self >( ) ] ) -> Self {
26252628 Self :: from_be( Self :: from_ne_bytes( bytes) )
@@ -2650,6 +2653,7 @@ macro_rules! int_impl {
26502653 /// ```
26512654 #[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
26522655 #[ rustc_const_stable( feature = "const_int_conversion" , since = "1.44.0" ) ]
2656+ #[ must_use]
26532657 #[ inline]
26542658 pub const fn from_le_bytes( bytes: [ u8 ; mem:: size_of:: <Self >( ) ] ) -> Self {
26552659 Self :: from_le( Self :: from_ne_bytes( bytes) )
@@ -2691,6 +2695,7 @@ macro_rules! int_impl {
26912695 /// ```
26922696 #[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
26932697 #[ rustc_const_stable( feature = "const_int_conversion" , since = "1.44.0" ) ]
2698+ #[ must_use]
26942699 // SAFETY: const sound because integers are plain old datatypes so we can always
26952700 // transmute to them
26962701 #[ inline]
0 commit comments