Closed fpoli closed 4 months ago
The MIR encoding of matches!(Ordering::Greater, Ordering::Greater)
:
So, Prusti is encoding the discriminant of Ordering::Greater
as 2, while the true
arm of the match
(on the right) expected the discriminant of Ordering::Greater
to be 1.
The following program is encoded to an
assert false
(more precisely,assert (2 == 1) ? true : false
), but it should beassert true
:This is an unsoundness; it's enough to flip the boolean:
The following is encoded correctly, so the issue seems to be related to the
prusti_assert!
procedural macro: