Support getting the minimum 16-bit isize value

This commit is contained in:
Jake Goulding 2016-06-08 20:19:41 -04:00
parent 0740a93cc2
commit e51958ba72

View File

@ -367,6 +367,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
ast::IntTy::Is => {
let int_ty = self.hir.tcx().sess.target.int_type;
let min = match int_ty {
ast::IntTy::I16 => std::i16::MIN as i64,
ast::IntTy::I32 => std::i32::MIN as i64,
ast::IntTy::I64 => std::i64::MIN,
_ => unreachable!()