Skip to content

[pointer] SizeEq supports raw pointer transmutes #2422

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

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Mar 6, 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!.


This PR is on branch cell-traits.

@joshlf joshlf mentioned this pull request Mar 6, 2025
@joshlf joshlf requested a review from jswrenn March 6, 2025 23:19
@joshlf joshlf enabled auto-merge March 6, 2025 23:19
@joshlf joshlf force-pushed the I090715fd9ed6f100fd35513b05054015621ecb9c branch from 9eed6ef to 5f3623e Compare March 6, 2025 23:22
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 45.90164% with 33 lines in your changes missing coverage. Please review.

Project coverage is 87.53%. Comparing base (7c211c1) to head (b544516).

Files with missing lines Patch % Lines
src/impls.rs 25.00% 18 Missing ⚠️
src/pointer/transmute.rs 0.00% 9 Missing ⚠️
src/util/macros.rs 73.91% 6 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                              @@
##           I3d825b6c6b99277c96d9fd6a6761bdfad2000473    #2422      +/-   ##
=============================================================================
- 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshlf joshlf force-pushed the I090715fd9ed6f100fd35513b05054015621ecb9c branch from 5f3623e to dff5d0c Compare March 6, 2025 23:38
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
@joshlf joshlf force-pushed the I090715fd9ed6f100fd35513b05054015621ecb9c branch from dff5d0c to b544516 Compare March 7, 2025 18:50
@joshlf joshlf changed the base branch from main to I3d825b6c6b99277c96d9fd6a6761bdfad2000473 March 7, 2025 18:50
@joshlf joshlf deleted the branch I3d825b6c6b99277c96d9fd6a6761bdfad2000473 March 7, 2025 18:50
@joshlf joshlf closed this Mar 7, 2025
auto-merge was automatically disabled March 7, 2025 18:50

Pull request was closed

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.

2 participants