-
Notifications
You must be signed in to change notification settings - Fork 113
[pointer] Support generic invariant mapping #1896
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jswrenn I'd love for you to take a crack at improving the ergonomics here. |
5e5d01d
to
231e3e3
Compare
7c245c5
to
062b71a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1896 +/- ##
==========================================
- Coverage 87.67% 87.66% -0.02%
==========================================
Files 17 17
Lines 5973 5967 -6
==========================================
- Hits 5237 5231 -6
Misses 736 736 ☔ View full report in Codecov by Sentry. |
231e3e3
to
c19a3e9
Compare
062b71a
to
9eab1bd
Compare
c19a3e9
to
148380c
Compare
9eab1bd
to
39d2339
Compare
148380c
to
d2919d9
Compare
39d2339
to
da4069e
Compare
d2919d9
to
3928ed2
Compare
da4069e
to
2172f24
Compare
3928ed2
to
47de3c7
Compare
2172f24
to
2a92f9f
Compare
47de3c7
to
2480958
Compare
2a92f9f
to
9e69c15
Compare
2480958
to
c3590eb
Compare
9e69c15
to
19875da
Compare
c3590eb
to
d176d7a
Compare
19875da
to
029d5d6
Compare
8451eff
to
e5494fe
Compare
This commit adds a framework which supports encoding in the type system any `I -> I` mapping where `I` is any `Invariant` type. This permits us to make `cast_unsized`'s return value smarter, and as a result, allows us to remove a lot of `unsafe` code. Makes progress on #1122
e5494fe
to
a991c04
Compare
jswrenn
approved these changes
Oct 14, 2024
jswrenn
approved these changes
Oct 14, 2024
This was referenced Oct 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit adds a framework which supports encoding in the type system any
I -> I
mapping whereI
is anyInvariant
type. This permits us to makecast_unsized
's return value smarter, and as a result, allows us to remove a lot ofunsafe
code.Makes progress on #1122