Skip to content

Commit b3bdc24

Browse files
authored
Rollup merge of #61647 - JohnTitor:use-stable-func, r=Centril
Use stable wrappers in f32/f64::signum Fixes #61638 r? @Centril
2 parents 96a8050 + 43ab14e commit b3bdc24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/libstd/f32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl f32 {
188188
if self.is_nan() {
189189
NAN
190190
} else {
191-
unsafe { intrinsics::copysignf32(1.0, self) }
191+
1.0_f32.copysign(self)
192192
}
193193
}
194194

Diff for: src/libstd/f64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl f64 {
166166
if self.is_nan() {
167167
NAN
168168
} else {
169-
unsafe { intrinsics::copysignf64(1.0, self) }
169+
1.0_f64.copysign(self)
170170
}
171171
}
172172

0 commit comments

Comments
 (0)