diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-22 14:12:55 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-02-22 14:12:55 +0100 |
| commit | d1b34acb3bfa202704b5ab13e4b35eb569cf7d67 (patch) | |
| tree | 85ade6ea4211df0474dde05c9c4fcdbb0c5995bb /library/std/src | |
| parent | 04e7a10af68e6174e42e9ce4a6e81f97722a6032 (diff) | |
| download | rust-d1b34acb3bfa202704b5ab13e4b35eb569cf7d67.tar.gz rust-d1b34acb3bfa202704b5ab13e4b35eb569cf7d67.zip | |
make the new intrinsics safe
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/f128.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f16.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f32.rs | 2 | ||||
| -rw-r--r-- | library/std/src/f64.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/f128.rs b/library/std/src/f128.rs index 615c4fd3348..d4aa174cee5 100644 --- a/library/std/src/f128.rs +++ b/library/std/src/f128.rs @@ -129,7 +129,7 @@ impl f128 { #[unstable(feature = "f128", issue = "116909")] #[must_use = "method returns a new number and does not mutate the original value"] pub fn round_ties_even(self) -> f128 { - unsafe { intrinsics::round_ties_even_f128(self) } + intrinsics::round_ties_even_f128(self) } /// Returns the integer part of `self`. diff --git a/library/std/src/f16.rs b/library/std/src/f16.rs index 85b82b91fab..c0678732365 100644 --- a/library/std/src/f16.rs +++ b/library/std/src/f16.rs @@ -129,7 +129,7 @@ impl f16 { #[unstable(feature = "f16", issue = "116909")] #[must_use = "method returns a new number and does not mutate the original value"] pub fn round_ties_even(self) -> f16 { - unsafe { intrinsics::round_ties_even_f16(self) } + intrinsics::round_ties_even_f16(self) } /// Returns the integer part of `self`. diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index da1f000278d..bdcbd8b30b6 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -125,7 +125,7 @@ impl f32 { #[stable(feature = "round_ties_even", since = "1.77.0")] #[inline] pub fn round_ties_even(self) -> f32 { - unsafe { intrinsics::round_ties_even_f32(self) } + intrinsics::round_ties_even_f32(self) } /// Returns the integer part of `self`. diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 8a9f693a7a8..11acc13d657 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -125,7 +125,7 @@ impl f64 { #[stable(feature = "round_ties_even", since = "1.77.0")] #[inline] pub fn round_ties_even(self) -> f64 { - unsafe { intrinsics::round_ties_even_f64(self) } + intrinsics::round_ties_even_f64(self) } /// Returns the integer part of `self`. |
