Add support for rawptrs#164
Conversation
… (such as raw pointers as struct fields)
…derefs of lifetime projections
|
@ThomasMayerl The code changes themselves look reasonable, but before merging please fix the failing test. It looks like the error is: |
zgrannan
left a comment
There was a problem hiding this comment.
@ThomasMayerl This mostly looks good; the capability fix is a bit of a workaround for some other underlying issue: namely, the capability for the blocked places should already be correctly set via AbsExpander.expand_to_places. However, since the workaround doesn't seem to be breaking anything, I'll leave it in for now. At some point, I'm going to revisit the loop implementation to address #162 so hopefully the underlying issue can be fixed at that time.
This PR adds support for rawptrs by adding Delegation Edges that connect rawptrs to their derived from places when this fact is known. Applying an action to a rawptr deref degelates that PCG action to the derived from place. This PR also adds RawPtrDeref edges that work similar to normal Deref edges - just that we do not have a lifetime projection when we do not know where the rawptr was derived from.
Note: The borrow checker does not check if rawptrs can be accessed. Nor does the PCG. However, this PR should show how capabilities change for references/places once rawptrs are involved.