File tree 4 files changed +6
-0
lines changed
4 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1378,6 +1378,7 @@ impl f128 {
1378
1378
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1379
1379
#[ must_use = "method returns a new number and does not mutate the original value" ]
1380
1380
pub const fn copysign ( self , sign : f128 ) -> f128 {
1381
+ // SAFETY: this is actually a safe intrinsic
1381
1382
unsafe { intrinsics:: copysignf128 ( self , sign) }
1382
1383
}
1383
1384
}
Original file line number Diff line number Diff line change @@ -1352,6 +1352,7 @@ impl f16 {
1352
1352
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1353
1353
#[ must_use = "method returns a new number and does not mutate the original value" ]
1354
1354
pub const fn copysign ( self , sign : f16 ) -> f16 {
1355
+ // SAFETY: this is actually a safe intrinsic
1355
1356
unsafe { intrinsics:: copysignf16 ( self , sign) }
1356
1357
}
1357
1358
}
Original file line number Diff line number Diff line change @@ -1449,6 +1449,7 @@ impl f32 {
1449
1449
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1450
1450
#[ inline]
1451
1451
pub const fn abs ( self ) -> f32 {
1452
+ // SAFETY: this is actually a safe intrinsic
1452
1453
unsafe { intrinsics:: fabsf32 ( self ) }
1453
1454
}
1454
1455
@@ -1509,6 +1510,7 @@ impl f32 {
1509
1510
#[ stable( feature = "copysign" , since = "1.35.0" ) ]
1510
1511
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1511
1512
pub const fn copysign ( self , sign : f32 ) -> f32 {
1513
+ // SAFETY: this is actually a safe intrinsic
1512
1514
unsafe { intrinsics:: copysignf32 ( self , sign) }
1513
1515
}
1514
1516
}
Original file line number Diff line number Diff line change @@ -1449,6 +1449,7 @@ impl f64 {
1449
1449
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1450
1450
#[ inline]
1451
1451
pub const fn abs ( self ) -> f64 {
1452
+ // SAFETY: this is actually a safe intrinsic
1452
1453
unsafe { intrinsics:: fabsf64 ( self ) }
1453
1454
}
1454
1455
@@ -1509,6 +1510,7 @@ impl f64 {
1509
1510
#[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
1510
1511
#[ inline]
1511
1512
pub const fn copysign ( self , sign : f64 ) -> f64 {
1513
+ // SAFETY: this is actually a safe intrinsic
1512
1514
unsafe { intrinsics:: copysignf64 ( self , sign) }
1513
1515
}
1514
1516
}
You can’t perform that action at this time.
0 commit comments