1
Fork 0

Enable f16 and f128 in HIR

This commit is contained in:
Trevor Gross 2024-03-02 21:44:24 -05:00
parent 80bb15ed91
commit dc65095298
2 changed files with 8 additions and 8 deletions

View file

@ -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!(),
};