Skip to content
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

Issues with UnsafeCells #694

Open
joshlf opened this issue Dec 8, 2023 · 0 comments
Open

Issues with UnsafeCells #694

joshlf opened this issue Dec 8, 2023 · 0 comments

Comments

@joshlf
Copy link
Member

joshlf commented Dec 8, 2023

See also: #251

TODO: Discuss the following:

  • The fact that there's no way to "disable" interior mutability under stacked borrows, but there is under tree borrows
  • Why NoCell for MaybeUninit<T> requires T: NoCell (it's the only way to ban cells today)
    • Under certain memory models (ie, not stacked borrows), MaybeUninit<T> wouldn't "expose" any of its contained Cells, and so it could be NoCell with no bounds on T
  • Why our current NoCell implementation (#656) bans UnsafeCell<()> and even [UnsafeCell<u8>; 0]; what would need to change in order for these to be permitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant