You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tedinski
changed the title
Kani asser override is more restrictive than standard assert
Kani assert override is more restrictive than standard assert
Jan 12, 2023
which is what the standard assert macro expands to, but it is not valid without the negation:
fn main(){let v:bool = true;if&v {}
$ rustc not_neg.rs
error[E0308]: mismatched types
--> not_neg.rs:3:8
|
3 |if&v { }
| ^^ expected `bool`, found `&bool`|
help: consider removing the borrow
|
3 - if&v { }
3 + if v { }
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
This code works as a test but fails with Kani:
With test: builds successfully, no warnings/errors, test passes.
With kani:
The text was updated successfully, but these errors were encountered: