Refining struct with no invariants causes assignment might be unsafe
error
#755
Labels
mut-ref-unfolding
Related to unfolding of mutable references
Hello, when I verify the following code implementing a SubSlice data structure:
it passes.
However, when I try to add indexes to this data structure:
it fails with:
This is a bit confusing to me, as I would assume that if you add indexes to a struct, it should behave the same until you try to state invariants about it (e.g.
lo < hi && hi < len
). By adding indexes to the fields, did I assert something about the struct's behavior?The text was updated successfully, but these errors were encountered: