Skip to content

Commit 5abcb5f

Browse files
author
Brett Schiff
committed
compile fix
1 parent c1298c1 commit 5abcb5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rust/rust_typecheck.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -900,10 +900,10 @@ void rust_typecheckt::typecheck_expr_unary_num(exprt &expr)
900900
}
901901
else if(expr.op0().type().id() == ID_unsignedbv)
902902
{
903-
expr.type() = rust_reconcile_types(
904-
exprt(
905-
"", signedbv_typet(to_unsignedbv_type(expr.op0().type()).get_width())),
906-
expr.op0());
903+
signedbv_typet signed_with_correct_width(
904+
to_unsignedbv_type(expr.op0().type()).get_width());
905+
exprt expr_with_correct_type("", signed_with_correct_width);
906+
expr.type() = rust_reconcile_types(expr_with_correct_type, expr.op0());
907907
return;
908908
}
909909

0 commit comments

Comments
 (0)