Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AliasingSafe framework #1224

Merged
merged 1 commit into from
May 9, 2024
Merged

Add AliasingSafe framework #1224

merged 1 commit into from
May 9, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented May 9, 2024

This commit adds the pointer::aliasing_safety::AliasingSafe trait, which is implemented for pointer conversions which do not violate aliasing. This can happen either because the aliasing is exclusive or because neither type contains UnsafeCells.

This paves the way for us to remove Immutable bounds from some of our API, including from some derives.

Makes progress on #251

@joshlf joshlf requested a review from jswrenn May 9, 2024 20:37
@joshlf joshlf enabled auto-merge May 9, 2024 20:37
Copy link
Collaborator

@jswrenn jswrenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(pair programmed)

This commit adds the `pointer::aliasing_safety::AliasingSafe` trait,
which is implemented for pointer conversions which do not violate
aliasing. This can happen either because the aliasing is exclusive or
because neither type contains `UnsafeCell`s.

This paves the way for us to remove `Immutable` bounds from some of our
API, including from some derives.

Makes progress on #251

Co-authored-by: Jack Wrenn <jswrenn@amazon.com>
@joshlf joshlf added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit 1c3c3da May 9, 2024
210 checks passed
@joshlf joshlf deleted the aliasing-safety branch May 9, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants