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
{{ message }}
Repository navigation
Rename RMC prelude functions to more user-friendly names and to avoid warnings #589
Compiling pretty much any project with RMC results in warnings related to snake case name and unused variables, e.g.:
warning: unused variable: `cond`
--> src/lib.rs:1:22
|
1 | fn __VERIFIER_assume(cond: bool) {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_cond`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `cond`
--> src/lib.rs:5:27
|
5 | fn __VERIFIER_expect_fail(cond: bool, message: &str) {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_cond`
warning: unused variable: `message`
--> src/lib.rs:5:39
|
5 | fn __VERIFIER_expect_fail(cond: bool, message: &str) {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message`
warning: function `__VERIFIER_assume` should have a snake case name
--> src/lib.rs:1:4
|
1 | fn __VERIFIER_assume(cond: bool) {
| ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `__verifier_assume`
|
= note: `#[warn(non_snake_case)]` on by default
warning: function `__VERIFIER_expect_fail` should have a snake case name
--> src/lib.rs:5:4
|
5 | fn __VERIFIER_expect_fail(cond: bool, message: &str) {
| ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `__verifier_expect_fail`
In addition, the double underscore prefix (e.g. in __nondet()) seems unnecessary. We need to rename the functions and update them to avoid those warnings.
Here are example steps to reproduce the above warnings:
Activity