Enable f16
and f128
in HIR
This commit is contained in:
parent
80bb15ed91
commit
dc65095298
2 changed files with 8 additions and 8 deletions
|
@ -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!(),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue