This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed 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 {
1212}
1313
1414pub fn fabs ( x : f64 ) -> f64 {
15- // SAFETY: safe intrinsic with no preconditions
16- unsafe { core:: intrinsics:: fabsf64 ( x) }
15+ x. abs ( )
1716}
1817
1918pub fn fabsf ( x : f32 ) -> f32 {
20- // SAFETY: safe intrinsic with no preconditions
21- unsafe { core:: intrinsics:: fabsf32 ( x) }
19+ x. abs ( )
2220}
2321
2422pub fn floor ( x : f64 ) -> f64 {
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ macro_rules! float_impl {
200200 fn abs( self ) -> Self {
201201 cfg_if! {
202202 // FIXME(msrv): `abs` is available in `core` starting with 1.85.
203- if #[ cfg( feature = "unstable-intrinsics" ) ] {
203+ if #[ cfg( intrinsics_enabled ) ] {
204204 self . abs( )
205205 } else {
206206 super :: super :: generic:: fabs( self )
@@ -210,7 +210,7 @@ macro_rules! float_impl {
210210 fn copysign( self , other: Self ) -> Self {
211211 cfg_if! {
212212 // FIXME(msrv): `copysign` is available in `core` starting with 1.85.
213- if #[ cfg( feature = "unstable-intrinsics" ) ] {
213+ if #[ cfg( intrinsics_enabled ) ] {
214214 self . copysign( other)
215215 } else {
216216 super :: super :: generic:: copysign( self , other)
You can’t perform that action at this time.
0 commit comments