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

Restate Immutable's guarantees #1165

Merged
merged 1 commit into from
May 2, 2024
Merged

Restate Immutable's guarantees #1165

merged 1 commit into from
May 2, 2024

Commits on May 2, 2024

  1. Restate Immutable's guarantees

    This PR adjust's `Immutable`'s informal public contract. Previously, we publicly
    documented that `Immutable` denoted that a type does not directly contain
    `UnsafeCell`. Now, we only document that `Immutable` types do not permit
    interrior mutation.
    
    This change is made in recognition that:
     - Containing `UnsafeCell` may be fine, so long as that the special properties
       of that `UnsafeCell` cannot be exercised in safe code.
     - In contrast to what's guaranteed by the compiler's `Freeze` trait, we almost
       certainly need *recursive* immutability for safe transmutation.
    
    Makes progress towards #1155.
    jswrenn committed May 2, 2024
    Configuration menu
    Copy the full SHA
    2fbd431 View commit details
    Browse the repository at this point in the history