Skip to content

Commit

Permalink
Fix operand in fat pointer comparison (#3297)
Browse files Browse the repository at this point in the history
Fixing a typo that causes potential issues in compilation.

Co-authored-by: Matias Scharager <mscharag@amazon.com>
  • Loading branch information
pi314mm and Matias Scharager authored Jun 27, 2024
1 parent 997c95c commit c8746e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kani-compiler/src/codegen_cprover_gotoc/codegen/rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'tcx> GotocCtx<'tcx> {
) -> Expr {
debug!(?op, ?left_op, ?right_op, "codegen_comparison_fat_ptr");
let left_typ = self.operand_ty_stable(left_op);
let right_typ = self.operand_ty_stable(left_op);
let right_typ = self.operand_ty_stable(right_op);
assert_eq!(left_typ, right_typ, "Cannot compare pointers of different types");
assert!(self.is_fat_pointer_stable(left_typ));

Expand Down

0 comments on commit c8746e2

Please sign in to comment.