@@ -40,7 +40,7 @@ impl f32 {
40
40
/// assert_eq!(g.floor(), 3.0);
41
41
/// assert_eq!(h.floor(), -4.0);
42
42
/// ```
43
- #[ must_use]
43
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
44
44
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
45
45
#[ inline]
46
46
pub fn floor ( self ) -> f32 {
@@ -74,7 +74,7 @@ impl f32 {
74
74
/// assert_eq!(f.ceil(), 4.0);
75
75
/// assert_eq!(g.ceil(), 4.0);
76
76
/// ```
77
- #[ must_use]
77
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
78
78
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
79
79
#[ inline]
80
80
pub fn ceil ( self ) -> f32 {
@@ -97,7 +97,7 @@ impl f32 {
97
97
/// assert_eq!(f.round(), 3.0);
98
98
/// assert_eq!(g.round(), -3.0);
99
99
/// ```
100
- #[ must_use]
100
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
101
101
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
102
102
#[ inline]
103
103
pub fn round ( self ) -> f32 {
@@ -117,7 +117,7 @@ impl f32 {
117
117
/// assert_eq!(g.trunc(), 3.0);
118
118
/// assert_eq!(h.trunc(), -3.0);
119
119
/// ```
120
- #[ must_use]
120
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
121
121
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
122
122
#[ inline]
123
123
pub fn trunc ( self ) -> f32 {
@@ -139,7 +139,7 @@ impl f32 {
139
139
/// assert!(abs_difference_x <= f32::EPSILON);
140
140
/// assert!(abs_difference_y <= f32::EPSILON);
141
141
/// ```
142
- #[ must_use]
142
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
143
143
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
144
144
#[ inline]
145
145
pub fn fract ( self ) -> f32 { self - self . trunc ( ) }
@@ -163,7 +163,7 @@ impl f32 {
163
163
///
164
164
/// assert!(f32::NAN.abs().is_nan());
165
165
/// ```
166
- #[ must_use]
166
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
167
167
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
168
168
#[ inline]
169
169
pub fn abs ( self ) -> f32 {
@@ -188,7 +188,7 @@ impl f32 {
188
188
///
189
189
/// assert!(f32::NAN.signum().is_nan());
190
190
/// ```
191
- #[ must_use]
191
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
192
192
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
193
193
#[ inline]
194
194
pub fn signum ( self ) -> f32 {
@@ -221,7 +221,7 @@ impl f32 {
221
221
/// assert!(f32::NAN.copysign(1.0).is_nan());
222
222
/// ```
223
223
#[ inline]
224
- #[ must_use]
224
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
225
225
#[ stable( feature = "copysign" , since = "1.35.0" ) ]
226
226
pub fn copysign ( self , sign : f32 ) -> f32 {
227
227
unsafe { intrinsics:: copysignf32 ( self , sign) }
@@ -374,7 +374,7 @@ impl f32 {
374
374
/// assert!(abs_difference <= f32::EPSILON);
375
375
/// assert!(negative.sqrt().is_nan());
376
376
/// ```
377
- #[ must_use]
377
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
378
378
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
379
379
#[ inline]
380
380
pub fn sqrt ( self ) -> f32 {
@@ -401,7 +401,7 @@ impl f32 {
401
401
///
402
402
/// assert!(abs_difference <= f32::EPSILON);
403
403
/// ```
404
- #[ must_use]
404
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
405
405
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
406
406
#[ inline]
407
407
pub fn exp ( self ) -> f32 {
@@ -426,7 +426,7 @@ impl f32 {
426
426
///
427
427
/// assert!(abs_difference <= f32::EPSILON);
428
428
/// ```
429
- #[ must_use]
429
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
430
430
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
431
431
#[ inline]
432
432
pub fn exp2 ( self ) -> f32 {
@@ -449,7 +449,7 @@ impl f32 {
449
449
///
450
450
/// assert!(abs_difference <= f32::EPSILON);
451
451
/// ```
452
- #[ must_use]
452
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
453
453
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
454
454
#[ inline]
455
455
pub fn ln ( self ) -> f32 {
@@ -496,7 +496,7 @@ impl f32 {
496
496
///
497
497
/// assert!(abs_difference <= f32::EPSILON);
498
498
/// ```
499
- #[ must_use]
499
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
500
500
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
501
501
#[ inline]
502
502
pub fn log2 ( self ) -> f32 {
@@ -520,7 +520,7 @@ impl f32 {
520
520
///
521
521
/// assert!(abs_difference <= f32::EPSILON);
522
522
/// ```
523
- #[ must_use]
523
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
524
524
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
525
525
#[ inline]
526
526
pub fn log10 ( self ) -> f32 {
@@ -578,7 +578,7 @@ impl f32 {
578
578
///
579
579
/// assert!(abs_difference <= f32::EPSILON);
580
580
/// ```
581
- #[ must_use]
581
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
582
582
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
583
583
#[ inline]
584
584
pub fn cbrt ( self ) -> f32 {
@@ -620,7 +620,7 @@ impl f32 {
620
620
///
621
621
/// assert!(abs_difference <= f32::EPSILON);
622
622
/// ```
623
- #[ must_use]
623
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
624
624
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
625
625
#[ inline]
626
626
pub fn sin ( self ) -> f32 {
@@ -644,7 +644,7 @@ impl f32 {
644
644
///
645
645
/// assert!(abs_difference <= f32::EPSILON);
646
646
/// ```
647
- #[ must_use]
647
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
648
648
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
649
649
#[ inline]
650
650
pub fn cos ( self ) -> f32 {
@@ -667,7 +667,7 @@ impl f32 {
667
667
///
668
668
/// assert!(abs_difference <= f32::EPSILON);
669
669
/// ```
670
- #[ must_use]
670
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
671
671
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
672
672
#[ inline]
673
673
pub fn tan ( self ) -> f32 {
@@ -690,7 +690,7 @@ impl f32 {
690
690
///
691
691
/// assert!(abs_difference <= f32::EPSILON);
692
692
/// ```
693
- #[ must_use]
693
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
694
694
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
695
695
#[ inline]
696
696
pub fn asin ( self ) -> f32 {
@@ -713,7 +713,7 @@ impl f32 {
713
713
///
714
714
/// assert!(abs_difference <= f32::EPSILON);
715
715
/// ```
716
- #[ must_use]
716
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
717
717
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
718
718
#[ inline]
719
719
pub fn acos ( self ) -> f32 {
@@ -735,7 +735,7 @@ impl f32 {
735
735
///
736
736
/// assert!(abs_difference <= f32::EPSILON);
737
737
/// ```
738
- #[ must_use]
738
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
739
739
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
740
740
#[ inline]
741
741
pub fn atan ( self ) -> f32 {
@@ -814,7 +814,7 @@ impl f32 {
814
814
///
815
815
/// assert!(abs_difference <= f32::EPSILON);
816
816
/// ```
817
- #[ must_use]
817
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
818
818
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
819
819
#[ inline]
820
820
pub fn exp_m1 ( self ) -> f32 {
@@ -836,7 +836,7 @@ impl f32 {
836
836
///
837
837
/// assert!(abs_difference <= f32::EPSILON);
838
838
/// ```
839
- #[ must_use]
839
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
840
840
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
841
841
#[ inline]
842
842
pub fn ln_1p ( self ) -> f32 {
@@ -860,7 +860,7 @@ impl f32 {
860
860
///
861
861
/// assert!(abs_difference <= f32::EPSILON);
862
862
/// ```
863
- #[ must_use]
863
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
864
864
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
865
865
#[ inline]
866
866
pub fn sinh ( self ) -> f32 {
@@ -884,7 +884,7 @@ impl f32 {
884
884
/// // Same result
885
885
/// assert!(abs_difference <= f32::EPSILON);
886
886
/// ```
887
- #[ must_use]
887
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
888
888
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
889
889
#[ inline]
890
890
pub fn cosh ( self ) -> f32 {
@@ -908,7 +908,7 @@ impl f32 {
908
908
///
909
909
/// assert!(abs_difference <= f32::EPSILON);
910
910
/// ```
911
- #[ must_use]
911
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
912
912
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
913
913
#[ inline]
914
914
pub fn tanh ( self ) -> f32 {
@@ -929,7 +929,7 @@ impl f32 {
929
929
///
930
930
/// assert!(abs_difference <= f32::EPSILON);
931
931
/// ```
932
- #[ must_use]
932
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
933
933
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
934
934
#[ inline]
935
935
pub fn asinh ( self ) -> f32 {
@@ -954,7 +954,7 @@ impl f32 {
954
954
///
955
955
/// assert!(abs_difference <= f32::EPSILON);
956
956
/// ```
957
- #[ must_use]
957
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
958
958
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
959
959
#[ inline]
960
960
pub fn acosh ( self ) -> f32 {
@@ -978,7 +978,7 @@ impl f32 {
978
978
///
979
979
/// assert!(abs_difference <= 1e-5);
980
980
/// ```
981
- #[ must_use]
981
+ #[ must_use = "method returns a new number and does not mutate the original value" ]
982
982
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
983
983
#[ inline]
984
984
pub fn atanh ( self ) -> f32 {
0 commit comments