Confusing difference in behavior when creating tracked struct #1467
matthias-brun
started this conversation in
General
Replies: 2 comments
-
|
This is technically by design:
However:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks for the comment.
Yeah, that's the actually problematic part, I think. I find it very hard to make sense of error messages while doing tracked things. It's often not clear to me whether I'm trying to do something that isn't possible or whether a tiny change is sufficient to make it work, as is the case in this example. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The following code works fine when we initialize the field
bwith a constant3u64but if we try to use the u64 from the argument, Verus emits an error about the expression's mode. This behavior is very confusing and in fact, seeing the mode error message had lead me to believe that values of tracked type can only be created in trusted code.Beta Was this translation helpful? Give feedback.
All reactions