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
This fails verification in the annotated locations:
// normal versionsfncaller1(u:u64) -> u64{3}fntest1(x:u64){let y = caller1(x);assert(call_ensures(caller1,(x,), y));// fails}fncaller2(u:u64) -> u64
requires false
{3}fntest2(x:u64){assume(call_requires(caller2,(x,)));caller2(x);// fails (precondition)}// trait versionstraitTr:Sized{fnf(self) -> Self;}fntest_ensures<T:Tr>(a:T){let b = a.f();assert(call_ensures(T::f,(a,), b));// fails}traitTr2:Sized{fng(self) -> Self
requires false;}fntest_requires<T:Tr2>(a:T){assume(call_requires(T::g,(a,)));let b = a.g();// fails (precondition)}
Note that it's possible to workaround this by assigning the functions to variables and then calling them. This works because it forces Verus to invoke the more flexible function trait based encoding machinery.
That is, everything below succeeds:
// normal versionsfncaller1(u:u64) -> u64{3}fntest1(x:u64){let f = caller1;let y = f(x);assert(call_ensures(caller1,(x,), y));}fncaller2(u:u64) -> u64
requires false
{3}fntest2(x:u64){assume(call_requires(caller2,(x,)));let f = caller2;f(x);}// trait versionstraitTr:Sized{fnf(self) -> Self;}fntest_ensures<T:Tr>(a:T){let f = T::f;let b = f(a);assert(call_ensures(T::f,(a,), b));}traitTr2:Sized{fng(self) -> Self
requires false;}fntest_requires<T:Tr2>(a:T){assume(call_requires(T::g,(a,)));let g = T::g;let b = g(a);}
The text was updated successfully, but these errors were encountered:
This fails verification in the annotated locations:
Note that it's possible to workaround this by assigning the functions to variables and then calling them. This works because it forces Verus to invoke the more flexible function trait based encoding machinery.
That is, everything below succeeds:
The text was updated successfully, but these errors were encountered: