[pointer] SizeEq supports raw pointer transmutes#2427
Merged
Conversation
This was referenced Mar 7, 2025
Base automatically changed from
I3d825b6c6b99277c96d9fd6a6761bdfad2000473
to
main
March 7, 2025 19:32
jswrenn
approved these changes
Mar 7, 2025
This permits us to remove the `KnownLayout` bounds from `Ptr::transmute`, and thus to remove `Ptr::transmute_sized` entirely. This also allows us to remove the hand-rolled impl of `TryFromBytes` for `ManuallyDrop<T>`, replacing it with an invocation of `impl_for_transmute_from!`. gherrit-pr-id: I090715fd9ed6f100fd35513b05054015621ecb9c
b544516 to
3a19028
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2427 +/- ##
==========================================
- Coverage 88.03% 87.53% -0.51%
==========================================
Files 17 18 +1
Lines 6412 6408 -4
==========================================
- Hits 5645 5609 -36
- Misses 767 799 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
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 permits us to remove the
KnownLayoutbounds fromPtr::transmute, and thus to removePtr::transmute_sizedentirely.This also allows us to remove the hand-rolled impl of
TryFromBytesforManuallyDrop<T>, replacing it with an invocation ofimpl_for_transmute_from!.This PR is on branch cell-traits.