prusti-dev
prusti-dev copied to clipboard
Failing procedural macro of a contract
The program
use prusti_contracts::*;
#[pure] // <-- ERROR
#[ensures="result > 0"]
fn len(r: i32) -> i32 {
123
}
fails with
custom attribute panicked
message: internal error: entered unreachable code
However, the correct behaviour is to point out that the postcondition should be #[ensures(...)] instead of #[ensures="..."].