Add must_use on copysign
Added a #[must_use] annotation on copysign, per review feedback.
This commit is contained in:
parent
9a2e7026dc
commit
f08db6bf1e
@ -221,6 +221,7 @@ impl f32 {
|
||||
/// assert!(f32::NAN.copysign(1.0).is_nan());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[unstable(feature="copysign", issue="55169")]
|
||||
pub fn copysign(self, y: f32) -> f32 {
|
||||
unsafe { intrinsics::copysignf32(self, y) }
|
||||
|
@ -199,6 +199,7 @@ impl f64 {
|
||||
/// assert!(f64::NAN.copysign(1.0).is_nan());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[unstable(feature="copysign", issue="55169")]
|
||||
pub fn copysign(self, y: f64) -> f64 {
|
||||
unsafe { intrinsics::copysignf64(self, y) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user