Skip to content

Commit

Permalink
Add must_use on copysign
Browse files Browse the repository at this point in the history
Added a #[must_use] annotation on copysign, per review feedback.
  • Loading branch information
raphlinus committed Oct 18, 2018
1 parent 9a2e702 commit f08db6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
1 change: 1 addition & 0 deletions src/libstd/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit f08db6b

Please sign in to comment.