From 490b3077405bd0338b9d00741cc0dafd0624de98 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 22 Jan 2026 22:58:30 -0600 Subject: [PATCH] cleanup: Start splitting `FIXME(f16_f128)` into `f16`, `f128`, or `f16,f128` Make it easier to identify which FIXMEs are blocking stabilization of which type. --- compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 4 ++-- compiler/rustc_target/src/asm/riscv.rs | 2 +- library/core/src/convert/num.rs | 8 ++++---- library/core/src/fmt/float.rs | 2 +- library/core/src/num/dec2flt/mod.rs | 2 +- library/coretests/tests/floats/mod.rs | 4 ++-- library/coretests/tests/num/flt2dec/mod.rs | 2 +- library/std/tests/floats/f128.rs | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index e11ed796887a..1c674f0e8a85 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -665,8 +665,8 @@ impl MsvcBasicName for ty::UintTy { impl MsvcBasicName for ty::FloatTy { fn msvc_basic_name(self) -> &'static str { - // FIXME(f16_f128): `f16` and `f128` have no MSVC representation. We could improve the - // debuginfo. See: + // FIXME(f128): `f128` has no MSVC representation. We could improve the debuginfo. + // See: match self { ty::FloatTy::F16 => { bug!("`f16` should have been handled in `build_basic_type_di_node`") diff --git a/compiler/rustc_target/src/asm/riscv.rs b/compiler/rustc_target/src/asm/riscv.rs index d6b305253798..97eb93335818 100644 --- a/compiler/rustc_target/src/asm/riscv.rs +++ b/compiler/rustc_target/src/asm/riscv.rs @@ -47,7 +47,7 @@ impl RiscVInlineAsmRegClass { types! { _: I8, I16, I32, F16, F32; } } } - // FIXME(f16_f128): Add `q: F128;` once LLVM support the `Q` extension. + // FIXME(f128): Add `q: F128;` once LLVM support the `Q` extension. Self::freg => types! { f: F16, F32; d: F64; }, Self::vreg => &[], } diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 6ae588a4e044..c69026c5c9f3 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -154,7 +154,7 @@ impl_from!(i16 => isize, #[stable(feature = "lossless_iusize_conv", since = "1.2 // * 53 bits in f64 // * 113 bits in f128 // Lossy float conversions are not implemented at this time. -// FIXME(f16_f128): The `f16`/`f128` impls `#[stable]` attributes should be changed to reference +// FIXME(f16,f128): The `f16`/`f128` impls `#[stable]` attributes should be changed to reference // `f16`/`f128` when they are stabilised (trait impls have to have a `#[stable]` attribute, but none // of the `f16`/`f128` impls can be used on stable as the `f16` and `f128` types are unstable). @@ -168,7 +168,7 @@ impl_from!(i16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0" impl_from!(i16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); impl_from!(i32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); impl_from!(i32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); -// FIXME(f16_f128): This impl would allow using `f128` on stable before it is stabilised. +// FIXME(f128): This impl would allow using `f128` on stable before it is stabilised. // impl_from!(i64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); // unsigned integer -> float @@ -181,11 +181,11 @@ impl_from!(u16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0" impl_from!(u16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); impl_from!(u32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); impl_from!(u32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); -// FIXME(f16_f128): This impl would allow using `f128` on stable before it is stabilised. +// FIXME(f128): This impl would allow using `f128` on stable before it is stabilised. // impl_from!(u64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); // float -> float -// FIXME(f16_f128): adding additional `From<{float}>` impls to `f32` breaks inference. See +// FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See // impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]); diff --git a/library/core/src/fmt/float.rs b/library/core/src/fmt/float.rs index 556db239f249..380dbd25e104 100644 --- a/library/core/src/fmt/float.rs +++ b/library/core/src/fmt/float.rs @@ -236,7 +236,7 @@ floating! { f32 f64 } #[cfg(target_has_reliable_f16)] floating! { f16 } -// FIXME(f16_f128): A fallback is used when the backend+target does not support f16 well, in order +// FIXME(f16): A fallback is used when the backend+target does not support f16 well, in order // to avoid ICEs. #[cfg(not(target_has_reliable_f16))] diff --git a/library/core/src/num/dec2flt/mod.rs b/library/core/src/num/dec2flt/mod.rs index eee8adf4f755..66e30e1c5f7f 100644 --- a/library/core/src/num/dec2flt/mod.rs +++ b/library/core/src/num/dec2flt/mod.rs @@ -179,7 +179,7 @@ from_str_float_impl!(f16); from_str_float_impl!(f32); from_str_float_impl!(f64); -// FIXME(f16_f128): A fallback is used when the backend+target does not support f16 well, in order +// FIXME(f16): A fallback is used when the backend+target does not support f16 well, in order // to avoid ICEs. #[cfg(not(target_has_reliable_f16))] diff --git a/library/coretests/tests/floats/mod.rs b/library/coretests/tests/floats/mod.rs index 3f0d98e905fd..06fc3c96eafc 100644 --- a/library/coretests/tests/floats/mod.rs +++ b/library/coretests/tests/floats/mod.rs @@ -391,7 +391,7 @@ float_test! { } } -// FIXME(f16_f128): merge into `num` once the required `fmodl`/`fmodf128` function is available on +// FIXME(f128): merge into `num` once the required `fmodl`/`fmodf128` function is available on // all platforms. float_test! { name: num_rem, @@ -1632,7 +1632,7 @@ float_test! { } } -// FIXME(f16_f128): Uncomment and adapt these tests once the From<{u64,i64}> impls are added. +// FIXME(f128): Uncomment and adapt these tests once the From<{u64,i64}> impls are added. // float_test! { // name: from_u64_i64, // attrs: { diff --git a/library/coretests/tests/num/flt2dec/mod.rs b/library/coretests/tests/num/flt2dec/mod.rs index 4e73bd1f12ee..be1bc6ac460b 100644 --- a/library/coretests/tests/num/flt2dec/mod.rs +++ b/library/coretests/tests/num/flt2dec/mod.rs @@ -287,7 +287,7 @@ where check_exact!(f(f16::MIN_POSITIVE) => b"6103515625 ", -4); check_exact!(f(minf16) => b"59604644775390625", -7); - // FIXME(f16_f128): these should gain the check_exact_one tests like `f32` and `f64` have, + // FIXME(f16): these should gain the check_exact_one tests like `f32` and `f64` have, // but these values are not easy to generate. The algorithm from the Paxon paper [1] needs // to be adapted to binary16. } diff --git a/library/std/tests/floats/f128.rs b/library/std/tests/floats/f128.rs index 6db468b0ce26..d20762023caf 100644 --- a/library/std/tests/floats/f128.rs +++ b/library/std/tests/floats/f128.rs @@ -34,7 +34,7 @@ macro_rules! assert_f128_biteq { #[test] fn test_num_f128() { - // FIXME(f16_f128): replace with a `test_num` call once the required `fmodl`/`fmodf128` + // FIXME(f128): replace with a `test_num` call once the required `fmodl`/`fmodf128` // function is available on all platforms. let ten = 10f128; let two = 2f128;