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

Improve trait safety documentation #283

Merged
merged 1 commit into from
Sep 2, 2023
Merged

Improve trait safety documentation #283

merged 1 commit into from
Sep 2, 2023

Commits on Aug 28, 2023

  1. Improve trait safety documentation

    For each of our unsafe traits, clarify who can skip reading the Safety
    section.
    
    For each of our unsafe traits (except for `Unaligned`):
    - Clarify that it must be sound to construct `&[u8]` and `&T` to the
      same memory region (this addresses #8)
    - Clarify that, in order to implement the trait, the type's fields need
      to satisfy the same requirements, but don't actually need to implement
      the trait
    - Clarify that, in order to implement the trait, the type must not
      contain any `UnsafeCell`s
    
    Closes #8
    joshlf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    de6c335 View commit details
    Browse the repository at this point in the history