We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
UnsafeCell
Miri doesn't complain about the following code, but is this guaranteed to be sound?
fn main() { let x = UnsafeCell::new([0u8; 2]); let x = &x; let x_ptr: *const UnsafeCell<[u8; 2]> = x; let y_ptr = x_ptr as *const [UnsafeCell<u8>; 2]; let _y = unsafe { &*y_ptr }; }
I read #451 (comment) as implying this is intended to be sound, but I wanted to double-check.
The text was updated successfully, but these errors were encountered:
Isn't this basically https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html#method.as_array_of_cells ?
Sorry, something went wrong.
Also I'd say this is a duplicate of #451; projection to struct fields and array "fields" should behave the same.
Sounds good, that's what I figured. Thanks!
No branches or pull requests
Miri doesn't complain about the following code, but is this guaranteed to be sound?
I read #451 (comment) as implying this is intended to be sound, but I wanted to double-check.
The text was updated successfully, but these errors were encountered: