Skip to content

Commit

Permalink
[pointer] Update requirements for zero-sized types (#1614)
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

Closes #874
  • Loading branch information
joshlf authored Sep 7, 2024
1 parent 35a219b commit d66705a
Showing 1 changed file with 145 additions and 107 deletions.
Loading

0 comments on commit d66705a

Please sign in to comment.