zerocopy
zerocopy copied to clipboard
[pointer][invariant] Remove AliasingMapping, Inaccessible
We previously used AliasingMappings and Inaccessible to model
UnsafeCell agreement. This abuses the notion of a mapping since one
doesn't ever actually want to change the aliasing of a pointer (and
certainly not to Inaccessible) - really this was meant to model
pointer casts which should never be performed. In addition to being an
awkward fit, the presence of Inaccessible meant that code could not
assume that any Aliasing invariant permitted reading, and so we had to
add extra machinery to work around this.
Future commits will use a different, simpler model for denoting
UnsafeCell agreement or disagreement.
While we're here, make Read slightly more permissive, implemented for
A: Aliasing, T: Immutable rather than just A: Reference, T: Immutable.
Makes progress on #1122, #1866
This PR is on branch ptr-overhaul-more-generic-issue-1945.
- #1970
- #1969
- #1942
- #1911
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.46%. Comparing base (
4bd33fb) to head (ac629d9).
Additional details and impacted files
@@ Coverage Diff @@
## Ifc49755af0d90eeefe7822d755d508403c266bda #1942 +/- ##
==========================================================================
Coverage 89.46% 89.46%
==========================================================================
Files 17 17
Lines 5838 5838
==========================================================================
Hits 5223 5223
Misses 615 615
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.