-
Notifications
You must be signed in to change notification settings - Fork 104
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
[wip] UnalignUnsized #1828
base: maybe-uninit
Are you sure you want to change the base?
[wip] UnalignUnsized #1828
Conversation
a081f40
to
41b007b
Compare
41b007b
to
e7dc008
Compare
e7dc008
to
7d7b050
Compare
@@ -893,6 +930,57 @@ unsafe impl<T> KnownLayout for [T] { | |||
// struct `Foo(i32, [u8])` or `(u64, Foo)`. | |||
slc.len() | |||
} | |||
|
|||
#[cfg(feature = "alloc")] | |||
unsafe fn drop(slf: &mut UnalignUnsized<Self>) { |
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.
Does this play nicely with Pin
'd types?
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.
Yes, Pin bars you from moving the referent before running its destructor. It doesn't place any restrictions on what you do in the destructor.
de31dfd
to
47a35d7
Compare
todo!()
s remain. I suspect some of this would be easier, too, if we hadPtr
integration withUnalignUnsized
.