-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
Minimal example:
use vstd::prelude::*;
verus! {
pub struct Foo(u64);
impl core::ops::Add for Foo {
type Output = Foo;
fn add(self, other: Foo) -> Foo {
assume(self.0 + other.0 < 1000); // To hide overflow error
Foo(self.0 + other.0)
}
}
fn main() {
}
} // verus!Error message:
[rust_verify/src/verifier.rs:100:17] ¬e = "failed this postcondition"
[rust_verify/src/verifier.rs:100:17] &sp.as_string = "vstd/std_specs/ops.rs:70:25: 70:66 (#2446)"
error: postcondition not satisfied
verification results:: 1 verified, 1 errors
error: aborting due to 1 previous error
Version:
╰─>$ verus --version
Verus
Version: 0.2025.10.05.bf8e97e
Profile: release
Platform: linux_x86_64
Toolchain: 1.88.0-x86_64-unknown-linux-gnu
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels