From dc650952988de0f7321b5db56f26706530bf7212 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Sat, 2 Mar 2024 21:44:24 -0500 Subject: Enable `f16` and `f128` in HIR --- compiler/rustc_lint/src/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_lint') diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index 5d36a8b3d0e..51fe08d4af1 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -561,10 +561,11 @@ fn lint_literal<'tcx>( ty::Float(t) => { let is_infinite = match lit.node { ast::LitKind::Float(v, _) => match t { - ty::FloatTy::F16 => unimplemented!("f16_f128"), + // FIXME(f16_f128): add this check once we have library support + ty::FloatTy::F16 => Ok(false), ty::FloatTy::F32 => v.as_str().parse().map(f32::is_infinite), ty::FloatTy::F64 => v.as_str().parse().map(f64::is_infinite), - ty::FloatTy::F128 => unimplemented!("f16_f128"), + ty::FloatTy::F128 => Ok(false), }, _ => bug!(), }; -- cgit 1.4.1-3-g733a5