Skip to content

[pointer] Make invariants opaque, more ergonomic #1895

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

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Oct 12, 2024

Closes #1876

@joshlf joshlf requested a review from jswrenn October 12, 2024 22:51
@joshlf joshlf enabled auto-merge October 12, 2024 22:51
@joshlf joshlf changed the base branch from main to ptr-variance-for-real October 12, 2024 22:51
@joshlf joshlf changed the title Ptr opaque invariants [pointer] Make invariants opaque, more ergonomic Oct 12, 2024
auto-merge was automatically disabled October 12, 2024 22:51

Merge commits are not allowed on this repository

@joshlf
Copy link
Member Author

joshlf commented Oct 12, 2024

@jswrenn I didn't update any methods which modify two of three invariants. Any galaxy brain ideas on how to make those ergonomic?

The best I could come up with was yet another set of associated types e.g.:

type RetainAliasing<A: Alignment, V: Validity> = ...;

...but that's not forwards-compatible with adding new invariant types.

@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 7c245c5 to 062b71a Compare October 13, 2024 17:25
@joshlf joshlf force-pushed the ptr-variance-for-real branch from 3ab2c00 to cf218f6 Compare October 13, 2024 17:25
@joshlf joshlf force-pushed the ptr-opaque-invariants branch 2 times, most recently from 9eab1bd to 39d2339 Compare October 14, 2024 15:24
@joshlf joshlf force-pushed the ptr-variance-for-real branch from cf218f6 to 77362c9 Compare October 14, 2024 15:24
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 39d2339 to da4069e Compare October 14, 2024 15:30
@joshlf joshlf force-pushed the ptr-variance-for-real branch from 77362c9 to 25de780 Compare October 14, 2024 15:30
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from da4069e to 2172f24 Compare October 14, 2024 17:14
@joshlf joshlf force-pushed the ptr-variance-for-real branch from 25de780 to d96d763 Compare October 14, 2024 17:14
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 2172f24 to 2a92f9f Compare October 14, 2024 17:34
@joshlf joshlf force-pushed the ptr-variance-for-real branch from d96d763 to 471f4a9 Compare October 14, 2024 17:34
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 2a92f9f to 9e69c15 Compare October 14, 2024 17:50
@joshlf joshlf force-pushed the ptr-variance-for-real branch from 471f4a9 to 25ddf05 Compare October 14, 2024 17:50
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 9e69c15 to 19875da Compare October 14, 2024 18:30
@joshlf joshlf force-pushed the ptr-variance-for-real branch from 25ddf05 to 87a434a Compare October 14, 2024 18:30
Base automatically changed from ptr-variance-for-real to main October 14, 2024 19:02
@joshlf joshlf force-pushed the ptr-opaque-invariants branch from 19875da to 029d5d6 Compare October 14, 2024 19:03
@joshlf joshlf enabled auto-merge October 14, 2024 19:03
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.64%. Comparing base (51475bd) to head (029d5d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1895      +/-   ##
==========================================
- Coverage   87.65%   87.64%   -0.02%     
==========================================
  Files          17       17              
  Lines        5964     5956       -8     
==========================================
- Hits         5228     5220       -8     
  Misses        736      736              

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

@joshlf joshlf added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit f80a65d Oct 14, 2024
63 checks passed
@joshlf joshlf deleted the ptr-opaque-invariants branch October 14, 2024 19:38
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.

Make Ptr invariants opaque and more ergonomic
3 participants