collapsible_match

This commit is contained in:
Johann Hemmann 2024-01-19 13:36:56 +01:00
parent 657376858f
commit 4184c6af0d
6 changed files with 50 additions and 65 deletions

View file

@ -1387,10 +1387,7 @@ impl Evaluator<'_> {
| CastKind::PointerFromExposedAddress => {
let current_ty = self.operand_ty(operand, locals)?;
let is_signed = match current_ty.kind(Interner) {
TyKind::Scalar(s) => match s {
chalk_ir::Scalar::Int(_) => true,
_ => false,
},
TyKind::Scalar(chalk_ir::Scalar::Int(_)) => true,
_ => false,
};
let current = pad16(self.eval_operand(operand, locals)?.get(self)?, is_signed);