You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we can ensure that U: TransmuteFrom<T>, V: TransmuteFrom<U> implies V: TransmuteFrom<T>, then any #[repr(C)] struct with the same sequence of field types would be transmutable from and into Foo.
For types with uninit tails, we could support size extension:
#[derive(TransmuteFrom)]#[repr(C)]structBar{a:u8,b:u16,c:MaybeUninit<u32>,}// Emitted by the deriveunsafeimplTransmuteFrom<ReprC<(u8,u16)>>forBar{ ... }
The text was updated successfully, but these errors were encountered:
A hypothetical
#[derive(TransmuteFrom)]
could emit a number of useful impls:Further, imagine that we define a type like the following:
We could also emit:
If we can ensure that
U: TransmuteFrom<T>, V: TransmuteFrom<U>
impliesV: TransmuteFrom<T>
, then any#[repr(C)]
struct with the same sequence of field types would be transmutable from and intoFoo
.For types with uninit tails, we could support size extension:
The text was updated successfully, but these errors were encountered: