[pointer][invariant] Remove AliasingMapping, Inaccessible (#2301) #2386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We previously used
AliasingMapping
s andInaccessible
to modelUnsafeCell
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 toInaccessible
) - really this was meant to model pointer casts which should never be performed. In addition to being an awkward fit, the presence ofInaccessible
meant that code could not assume that anyAliasing
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 forA: Aliasing, T: Immutable
rather than justA: Reference, T: Immutable
.Makes progress on #1122, #1866
gherrit-pr-id: I1ac2ae177a235083e33b09fc848423220d3da042