Skip to content

Commit

Permalink
[pointer] Update requirements for zero-sized types
Browse files Browse the repository at this point in the history
Now that [1] is completed, zero-sized accesses no longer require
provenance. Per [2], zero-sized references are no longer required to be
dereferenceable, and so may not carry provenance.

This commit updates `Ptr`'s invariants to not require provenance or a
valid allocation when its referent is zero-sized.

[1] rust-lang/rust#117945
[2] rust-lang/rust#125021
  • Loading branch information
joshlf committed Sep 7, 2024
1 parent 35a219b commit 169525a
Showing 1 changed file with 145 additions and 107 deletions.
Loading

0 comments on commit 169525a

Please sign in to comment.