-
Notifications
You must be signed in to change notification settings - Fork 3
Add tests for mutability #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
PROVE_RS_SHOW_SPECS = [ | ||
'local-raw-fail', | ||
] | ||
PROVE_RS_SHOW_SPECS = ['local-raw-fail', 'interior-mut-fail', 'interior-mut2-fail', 'interior-mut3-fail'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do these one per line instead. Will make it easier to add/delete them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do
Can we rebase this on master to get current |
e46665a
to
ac342de
Compare
Adding tests to examine the boundaries of mutability and immutability, not all of these use
unsafe
but only the ones I listed as unsafe do we annotate unsafe directly:RefCell
(stuck onRvalue::AddressOf
)Cell
(stuck onRvalue::AddressOf
)UnsafeCell
(stuck onRvalue::AddressOf
)We discussed the possibility of adding tests that show demonstrate immutable field of mutable structs, but this is not possible in rust. There is a notion of private fields if structs come from other modules, but this is not the same as mutability.