@@ -628,6 +628,7 @@ impl f32 {
628628 ///
629629 /// assert!(abs_difference <= f32::EPSILON);
630630 /// ```
631+ #[ must_use = "this returns the result of the operation, without modifying the original" ]
631632 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
632633 #[ inline]
633634 pub fn recip ( self ) -> f32 {
@@ -684,6 +685,7 @@ impl f32 {
684685 /// ```
685686 ///
686687 /// If one of the arguments is NaN, then the other argument is returned.
688+ #[ must_use = "this returns the result of the comparison, without modifying either input" ]
687689 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
688690 #[ inline]
689691 pub fn max ( self , other : f32 ) -> f32 {
@@ -703,6 +705,7 @@ impl f32 {
703705 /// ```
704706 ///
705707 /// If one of the arguments is NaN, then the other argument is returned.
708+ #[ must_use = "this returns the result of the comparison, without modifying either input" ]
706709 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
707710 #[ inline]
708711 pub fn min ( self , other : f32 ) -> f32 {
@@ -726,6 +729,7 @@ impl f32 {
726729 /// If one of the arguments is NaN, then NaN is returned. Otherwise this returns the greater
727730 /// of the two numbers. For this operation, -0.0 is considered to be less than +0.0.
728731 /// Note that this follows the semantics specified in IEEE 754-2019.
732+ #[ must_use = "this returns the result of the comparison, without modifying either input" ]
729733 #[ unstable( feature = "float_minimum_maximum" , issue = "91079" ) ]
730734 #[ inline]
731735 pub fn maximum ( self , other : f32 ) -> f32 {
@@ -757,6 +761,7 @@ impl f32 {
757761 /// If one of the arguments is NaN, then NaN is returned. Otherwise this returns the lesser
758762 /// of the two numbers. For this operation, -0.0 is considered to be less than +0.0.
759763 /// Note that this follows the semantics specified in IEEE 754-2019.
764+ #[ must_use = "this returns the result of the comparison, without modifying either input" ]
760765 #[ unstable( feature = "float_minimum_maximum" , issue = "91079" ) ]
761766 #[ inline]
762767 pub fn minimum ( self , other : f32 ) -> f32 {
0 commit comments