mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-25 07:48:44 +00:00
library: Resolve outdated FIXMEs related to float bitcasts in const
This commit is contained in:
@@ -887,10 +887,11 @@ impl f128 {
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(f128)]
|
||||
/// # #[cfg(target_has_reliable_f128)] {
|
||||
///
|
||||
/// # // FIXME(f16_f128): enable this once const casting works
|
||||
/// # // assert_ne!((1f128).to_bits(), 1f128 as u128); // to_bits() is not casting!
|
||||
/// assert_ne!((1f128).to_bits(), 1f128 as u128); // to_bits() is not casting!
|
||||
/// assert_eq!((12.5f128).to_bits(), 0x40029000000000000000000000000000);
|
||||
/// # }
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "f128", issue = "116909")]
|
||||
|
||||
@@ -884,8 +884,7 @@ impl f16 {
|
||||
/// #![feature(f16)]
|
||||
/// # #[cfg(target_has_reliable_f16)] {
|
||||
///
|
||||
/// # // FIXME(f16_f128): enable this once const casting works
|
||||
/// # // assert_ne!((1f16).to_bits(), 1f16 as u128); // to_bits() is not casting!
|
||||
/// assert_ne!((1f16).to_bits(), 1f16 as u16); // to_bits() is not casting!
|
||||
/// assert_eq!((12.5f16).to_bits(), 0x4a40);
|
||||
/// # }
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user