Skip to content

Commit e51958b

Browse files
committed
Support getting the minimum 16-bit isize value
1 parent 0740a93 commit e51958b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/build/expr/as_rvalue.rs

+1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
367367
ast::IntTy::Is => {
368368
let int_ty = self.hir.tcx().sess.target.int_type;
369369
let min = match int_ty {
370+
ast::IntTy::I16 => std::i16::MIN as i64,
370371
ast::IntTy::I32 => std::i32::MIN as i64,
371372
ast::IntTy::I64 => std::i64::MIN,
372373
_ => unreachable!()

0 commit comments

Comments
 (0)