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

[pointer] Add separate PtrInner #1891

Merged
merged 1 commit into from
Oct 14, 2024
Merged

[pointer] Add separate PtrInner #1891

merged 1 commit into from
Oct 14, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Oct 12, 2024

PtrInner carries all invariants which are not controlled by type parameters. Since PtrInner does not promise to uphold aliasing, alignment, or validity, we can move some utility methods to PtrInner which previously were responsible for maintaining invariants orthogonal to their purpose.

Makes progress on #1892 (still needs to be fixed on v0.8.x)
Closes #1890

src/pointer/ptr.rs Outdated Show resolved Hide resolved
src/pointer/ptr.rs Outdated Show resolved Hide resolved
src/pointer/ptr.rs Outdated Show resolved Hide resolved
src/pointer/mod.rs Outdated Show resolved Hide resolved
@joshlf joshlf force-pushed the ptr-inner branch 3 times, most recently from 403a13c to 4a51127 Compare October 12, 2024 22:05
@joshlf joshlf marked this pull request as ready for review October 12, 2024 22:05
@joshlf joshlf requested a review from jswrenn October 12, 2024 22:05
@joshlf joshlf changed the title [pointer] Add separate PtrInner [pointer] Add separate PtrInner Oct 12, 2024
@joshlf joshlf force-pushed the ptr-inner branch 3 times, most recently from 5879a7e to 47a4678 Compare October 13, 2024 17:25
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2024

Codecov Report

Attention: Patch coverage is 98.56115% with 6 lines in your changes missing coverage. Please review.

Project coverage is 87.65%. Comparing base (d9e48e3) to head (620e6ce).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/pointer/inner.rs 98.47% 5 Missing ⚠️
src/pointer/ptr.rs 98.79% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1891      +/-   ##
==========================================
- Coverage   87.68%   87.65%   -0.04%     
==========================================
  Files          16       17       +1     
  Lines        5938     5964      +26     
==========================================
+ Hits         5207     5228      +21     
- Misses        731      736       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from ptr-variance to main October 14, 2024 15:13
@joshlf joshlf force-pushed the ptr-inner branch 2 times, most recently from 869dc7c to 1b205a0 Compare October 14, 2024 15:30
@joshlf joshlf enabled auto-merge October 14, 2024 15:33
@joshlf joshlf added this pull request to the merge queue Oct 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2024
@joshlf joshlf added this pull request to the merge queue Oct 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 14, 2024
`PtrInner` carries all invariants which are not controlled by type
parameters. Since `PtrInner` does not promise to uphold aliasing,
alignment, or validity, we can move some utility methods to `PtrInner`
which previously were responsible for maintaining invariants orthogonal
to their purpose.

Makes progress on #1892 (still needs to be fixed on v0.8.x)
Closes #1890
@joshlf joshlf enabled auto-merge October 14, 2024 17:14
@joshlf joshlf added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit b43c510 Oct 14, 2024
63 checks passed
@joshlf joshlf deleted the ptr-inner branch October 14, 2024 17:43
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.

Fix intentional unsoundness in Ptr::split_at
3 participants