File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
compiler-builtins/libm/src/math Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,11 @@ pub fn ceilf(x: f32) -> f32 {
12
12
}
13
13
14
14
pub fn fabs ( x : f64 ) -> f64 {
15
- // SAFETY: safe intrinsic with no preconditions
16
- unsafe { core:: intrinsics:: fabsf64 ( x) }
15
+ x. abs ( )
17
16
}
18
17
19
18
pub fn fabsf ( x : f32 ) -> f32 {
20
- // SAFETY: safe intrinsic with no preconditions
21
- unsafe { core:: intrinsics:: fabsf32 ( x) }
19
+ x. abs ( )
22
20
}
23
21
24
22
pub fn floor ( x : f64 ) -> f64 {
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ macro_rules! float_impl {
200
200
fn abs( self ) -> Self {
201
201
cfg_if! {
202
202
// FIXME(msrv): `abs` is available in `core` starting with 1.85.
203
- if #[ cfg( feature = "unstable-intrinsics" ) ] {
203
+ if #[ cfg( intrinsics_enabled ) ] {
204
204
self . abs( )
205
205
} else {
206
206
super :: super :: generic:: fabs( self )
@@ -210,7 +210,7 @@ macro_rules! float_impl {
210
210
fn copysign( self , other: Self ) -> Self {
211
211
cfg_if! {
212
212
// FIXME(msrv): `copysign` is available in `core` starting with 1.85.
213
- if #[ cfg( feature = "unstable-intrinsics" ) ] {
213
+ if #[ cfg( intrinsics_enabled ) ] {
214
214
self . copysign( other)
215
215
} else {
216
216
super :: super :: generic:: copysign( self , other)
You can’t perform that action at this time.
0 commit comments