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
error: datatype must have at least one non-recursive variant
--> /playground/src/main.rs:21:1
|
21 | struct Bar(u8, Box<Foo>, u8);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Similarly, if Vec is wrapped Verus fails to see the well-formed datatype definition:
Ok:
error: datatype must have at least one non-recursive variant
--> /playground/src/main.rs:24:1
|
24 | struct LazyBar(u8, spec_fn() -> LazyFoo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Such pattern can perfectly occur in exec code (though not directly due to the lack of function pointers in Verus, but possible with custom traits).
Relevant comments from Travis a while back: From #1360: .
The text was updated successfully, but these errors were encountered:
Issue 1: Verus might not be checking datatypes transitively:
Ok:
Err:
Verus reports:
Similarly, if
Vec
is wrapped Verus fails to see the well-formed datatype definition:Ok:
Err:
Issue 2: Verus might be overly conservative:
Consider a sensible use case of mutually recursive functions (modeling "lazy datatypes"):
Verus gives:
Such pattern can perfectly occur in
exec
code (though not directly due to the lack of function pointers in Verus, but possible with custom traits).Relevant comments from Travis a while back: From #1360: .
The text was updated successfully, but these errors were encountered: