We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1298c1 commit 5abcb5fCopy full SHA for 5abcb5f
src/rust/rust_typecheck.cpp
@@ -900,10 +900,10 @@ void rust_typecheckt::typecheck_expr_unary_num(exprt &expr)
900
}
901
else if(expr.op0().type().id() == ID_unsignedbv)
902
{
903
- expr.type() = rust_reconcile_types(
904
- exprt(
905
- "", signedbv_typet(to_unsignedbv_type(expr.op0().type()).get_width())),
906
- expr.op0());
+ signedbv_typet signed_with_correct_width(
+ to_unsignedbv_type(expr.op0().type()).get_width());
+ exprt expr_with_correct_type("", signed_with_correct_width);
+ expr.type() = rust_reconcile_types(expr_with_correct_type, expr.op0());
907
return;
908
909
0 commit comments