-
Notifications
You must be signed in to change notification settings - Fork 107
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][WIP] Transmute #2408
base: Ie66db9044be1dc310a6b7280a73652a357878376
Are you sure you want to change the base?
[pointer][WIP] Transmute #2408
Conversation
bd18425
to
4bd4fd9
Compare
feb5ccf
to
03547a1
Compare
I think we may have to handle |
4bd4fd9
to
f1b2bec
Compare
03547a1
to
0c59508
Compare
f1b2bec
to
653cdb9
Compare
src/wrappers.rs
Outdated
@@ -394,14 +394,14 @@ impl<T: Unaligned> Deref for Unalign<T> { | |||
|
|||
#[inline(always)] | |||
fn deref(&self) -> &T { | |||
Ptr::from_ref(self).transparent_wrapper_into_inner().bikeshed_recall_aligned().as_ref() | |||
Ptr::from_ref(self).transmute().bikeshed_recall_aligned().as_ref() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad news: This fails because it requires T: KnownLayout
, which we wanted to avoid. We might be able to work around it with the SizedKnownLayout
trick, or we might need to reconsider the T: KnownLayout
bound.
653cdb9
to
3e52166
Compare
0c59508
to
daf3a21
Compare
gherrit-pr-id: Iad14813bc6d933312bc8d7a1ddcf1aafc7126938
3e52166
to
3b22cad
Compare
This PR is on branch ptr-validity.