Floats are scalars!

This commit is contained in:
Oliver Schneider 2018-05-22 14:19:19 +02:00
parent 64a75ecc80
commit bf39c7f87c

View file

@ -1769,6 +1769,8 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
ty::TyChar => return Some(Size::from_bytes(4)),
ty::TyInt(ity) => attr::IntType::SignedInt(ity),
ty::TyUint(uty) => attr::IntType::UnsignedInt(uty),
ty::TyFloat(ast::FloatTy::F32) => return Some(Size::from_bytes(4)),
ty::TyFloat(ast::FloatTy::F64) => return Some(Size::from_bytes(8)),
_ => return None,
};
use ty::layout::IntegerExt;