diff options
Diffstat (limited to 'library/core/src/num/f16.rs')
| -rw-r--r-- | library/core/src/num/f16.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/num/f16.rs b/library/core/src/num/f16.rs index bd00ed0f4ed..ced5b51d262 100644 --- a/library/core/src/num/f16.rs +++ b/library/core/src/num/f16.rs @@ -892,6 +892,7 @@ impl f16 { #[inline] #[unstable(feature = "f16", issue = "116909")] #[must_use = "this returns the result of the operation, without modifying the original"] + #[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))] pub const fn to_bits(self) -> u16 { // SAFETY: `u16` is a plain old datatype so we can always transmute to it. unsafe { mem::transmute(self) } @@ -938,6 +939,7 @@ impl f16 { #[inline] #[must_use] #[unstable(feature = "f16", issue = "116909")] + #[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))] pub const fn from_bits(v: u16) -> Self { // It turns out the safety issues with sNaN were overblown! Hooray! // SAFETY: `u16` is a plain old datatype so we can always transmute from it. |
