diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-05-22 14:19:19 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-05-24 20:49:37 +0200 |
| commit | bf39c7f87c1208249d400bdc09003c69e2621b96 (patch) | |
| tree | aa1ec794d569df63ffd6216148f6ec8543dfac7c | |
| parent | 64a75ecc8014df45b5b875c5820a0406f41ae7bb (diff) | |
| download | rust-bf39c7f87c1208249d400bdc09003c69e2621b96.tar.gz rust-bf39c7f87c1208249d400bdc09003c69e2621b96.zip | |
Floats are scalars!
| -rw-r--r-- | src/librustc/ty/sty.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 411c86d7cca..4accc1b10f8 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -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; |
